Python | Numpy.dsplit() method Last Updated : 17 Sep, 2019 Comments Improve Suggest changes Like Article Like Report With the help of Numpy.dsplit()() method, we can get the splitted dimensions of an array by using Numpy.dsplit()() method. Syntax : Numpy.dsplit(numpy.array(), split_size) Return : Return the array having splitted dimensions. Example #1 : In this example we can see that using Numpy.expand_dims() method, we are able to get the splitted dimensions using this method. Python3 1=1 # import numpy import numpy as np # using Numpy.dsplit() method gfg = np.array([[1, 2, 5], [3, 4, 10], [5, 6, 15], [7, 8, 20]]) gfg = gfg.reshape(1, 2, 6) print(gfg) gfg = np.dsplit(gfg, 2) print(gfg) Output : [[[ 1 2 5 3 4 10] [ 5 6 15 7 8 20]]] [array([[[ 1, 2, 5], [ 5, 6, 15]]]), array([[[ 3, 4, 10], [ 7, 8, 20]]])] Example #2 : Python3 1=1 # import numpy import numpy as np # using Numpy.expand_dims() method gfg = np.array([[1, 2], [7, 8], [5, 10]]) gfg = gfg.reshape(1, 2, 3) print(gfg) gfg = np.dsplit(gfg, 3) print(gfg) Output : [[[ 1 2 7] [ 8 5 10]]] [array([[[1], [8]]]), array([[[2], [5]]]), array([[[ 7], [10]]])] Comment More infoAdvertise with us Next Article Python | Numpy.dsplit() method J Jitender_1998 Follow Improve Article Tags : Python Python-numpy Python numpy-arrayManipulation Practice Tags : python Similar Reads Python | numpy.fill_diagonal() method With the help of numpy.fill_diagonal() method, we can get filled the diagonals of numpy array with the value passed as the parameter in numpy.fill_diagonal() method. Syntax : numpy.fill_diagonal(array, value) Return : Return the filled value in the diagonal of an array. Example #1 : In this example 1 min read numpy.load() in Python numpy.load() function return the input array from a disk file with npy extension(.npy). Syntax : numpy.load(file, mmap_mode=None, allow_pickle=True, fix_imports=True, encoding='ASCII') Parameters: file : : file-like object, string, or pathlib.Path.The file to read. File-like objects must support the 2 min read Python | Numpy MaskedArray.__div__ numpy.ma.MaskedArray class is a subclass of ndarray designed to manipulate numerical arrays with missing data. With the help of Numpy MaskedArray.__div__ we can divide a particular value that is provided as a parameter in the MaskedArray.__div__() method. Syntax: numpy.MaskedArray.__div__ Return: Di 1 min read numpy.diff() in Python numpy.diff(arr[, n[, axis]]) function is used when we calculate the n-th order discrete difference along the given axis. The first order difference is given by out[i] = arr[i+1] - arr[i] along the given axis. If we have to calculate higher differences, we are using diff recursively. Syntax: numpy.di 2 min read numpy.loadtxt() in Python numpy.loadtxt() function is used to load data from a text file and return it as a NumPy array. It is ideal for reading large data sets that are stored in simple text formats, such as CSV files or space-separated files.Example: Basic Usage of numpy.loadtxt() for Reading a Simple Space-Separated FileT 4 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.ldexp() in Python In Python, numpy.ldexp(arr1, arr2[, out]) function returns arr1 * (2**arr2), element-wise. This is also called as inverse of numpy.frexp() function. Syntax: numpy.ldexp()Parameters: arr1: [array_like] Array of multipliers. arr2: [array_like, int] Array of twos exponents. out: [ndarray, optional] Out 1 min read numpy.nansum() in Python numpy.nansum()function is used when we want to compute the sum of array elements over a given axis treating Not a Numbers (NaNs) as zero. Syntax : numpy.nansum(arr, axis=None, dtype=None, out=None, keepdims='no value') Parameters : arr : [array_like] Array containing numbers whose sum is desired. If 3 min read Python | Numpy ndarray.__imod__() With the help of Numpy ndarray.__imod__(), every element in an array is operated on binary operator i.e mod(%). Remember we can use any type of values in an array and value for mod is applied as the parameter in ndarray.__imod__(). Syntax: ndarray.__imod__($self, value, /) Return: self%=value Exampl 1 min read numpy.fix() in Python The numpy.fix() is a mathematical function that rounds elements of the array to the nearest integer towards zero. The rounded values are returned as floats. Syntax : numpy.fix(a, b = None) Parameters : a : [array_like] Input array to be floated. b : [ndarray, optional] Output array. Return : The arr 2 min read Like