Python | Numpy np.multinomial() method Last Updated : 13 Oct, 2019 Comments Improve Suggest changes Like Article Like Report With the help of np.multinomial() method, we can get the array of multinomial distribution by using np.multinomial() method. Syntax : np.multinomial(n, nval, size) Return : Return the array of multinomial distribution. Example #1 : In this example we can see that by using np.multinomial() method, we are able to get the multinomial distribution array using this method. Python3 1=1 # import numpy import numpy as np # using np.multinomial() method gfg = np.random.multinomial(8, [0.1, 0.22, 0.333, 0.4444], 2) print(gfg) Output : [[1 4 2 1] [0 0 3 5]] Example #2 : Python3 1=1 # import numpy import numpy as np # using np.multinomial() method gfg = np.random.multinomial(12, [0.1, 0.12, 0.123, 0.1234, 0.12345], 3) print(gfg) Output : [[2 0 1 1 8] [0 1 1 1 9] [1 1 1 0 9]] Comment More infoAdvertise with us Next Article Python | Numpy np.multinomial() method J Jitender_1998 Follow Improve Article Tags : Technical Scripter Python Python-numpy Python numpy-arrayManipulation Practice Tags : python Similar Reads Python | Numpy np.multivariate_normal() method With the help of np.multivariate_normal() method, we can get the array of multivariate normal values by using np.multivariate_normal() method. Syntax : np.multivariate_normal(mean, matrix, size) Return : Return the array of multivariate normal values. Example #1 : In this example we can see that by 1 min read numpy.ndarray.ndim() method | Python numpy.ndarray.ndim() function return the number of dimensions of an array. Syntax : numpy.ndarray.ndim(arr) Parameters : arr : [array_like] Input array. If it is not already an ndarray, a conversion is attempted. Return : [int] Return the number of dimensions in arr. Code #1 : Python3 # Python progr 1 min read Python | Numpy np.hermeone() method With the help of np.hermeone() method, we can use hermeone instead of np.ones() by using np.hermeone() method. Syntax : np.hermeone Return : Return the array of ones. Example #1 : In this example we can see that by using np.hermeone() method, we are able to get the functionality of np.ones as same a 1 min read Python | Numpy np.hermezero() method With the help of np.hermezero() method, we can use hermezero instead of np.zeros() by using np.hermezero() method. Syntax : np.hermezero Return : Return the array of zeros. Example #1 : In this example we can see that by using np.hermezero() method, we are able to get the functionality of np.zeros a 1 min read Python | Numpy np.lagone() method np.lagone() method can be used instead of np.ones for creating a array whose elements are 1. Syntax : np.lagone() Return : Return array([1]) Example #1 : Python3 1=1 # Python program explaining # numpy.lagone() method # import numpy and lagone import numpy as np from numpy.polynomial.laguerre import 1 min read numpy.multiply() in Python The numpy.multiply() is a numpy function in Python which is used to find element-wise multiplication of two arrays or scalar (single value). It returns the product of two input array element by element.Syntax:numpy.multiply(arr1, arr2, out=None, where=True, casting='same_kind', order='K', dtype=None 3 min read numpy.ma.choose() function - Python numpy.ma.choose() function use an index array to construct a new array from a set of choices. Given an array of integers and a set of n choice arrays, this method will create a new array that merges each of the choice arrays. Where arr value in arr is i, the new array will have the value that choice 2 min read Python | Numpy np.hermevander() method With the help of np.hermevander() method, we can get the pseudo vandermonde matrix at a given degree by using np.hermevander() method. Syntax : np.hermevander(x, deg) Return : Return the pseudo vandermonde matrix. Example #1 : In this example we can see that by using np.hermevander() method, we are 1 min read Python | Numpy np.digitize() method With the help of np.digitize() method, we can get the indices of the bins to which each value belongs in an array.Syntax : np.digitize(Array, Bin, Right)Return : Return an array of indices of the bins. Example #1 : In this example we can see that by using np.digitize() method, we are able to get the 1 min read Python | Numpy np.as_series() method With the help of np.as_series() method, we can get a 1-D series from multidimensional array by using np.as_series() method. Syntax : np.as_series(array) Return : Return a 1-D series. Example #1 : In this example we can see that by using np.as_series() method, we are able to get the 1-D series from m 1 min read Like