Python | Numpy np.flatiter() method Last Updated : 03 Nov, 2019 Comments Improve Suggest changes Like Article Like Report With the help of np.flatiter() method, we can get the flat iterator with the help of np.flatiter() method. Syntax : np.flatiter() Return : Return the flat iterator. Example #1 : In this example we can see that by using np.flatiter() method, we are able to get the flat iterator using this method. Python3 1=1 # import numpy import numpy as np # using np.flatiter() method a = np.array([6, 5, 4, 3, 2, 1]) gfg = a.flat for items in gfg: print(items) Output : 6 5 4 3 2 1 Example #2 : Python3 1=1 # import numpy import numpy as np # using np.flatiter() method a = np.array(['geeks', 'for', 'geeks']) gfg = a.flat for items in gfg: print(items) Output : geeks for geeks Comment More infoAdvertise with us Next Article Python | Numpy np.flatiter() method J Jitender_1998 Follow Improve Article Tags : Technical Scripter Python Python-numpy Python numpy-arrayManipulation Practice Tags : python Similar Reads 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 numpy.flatnonzero() in Python numpy.flatnonzero()function is used to Compute indices that are non-zero in the flattened version of arr. Syntax : numpy.flatnonzero(arr) Parameters : arr : [array_like] Input array. Return : ndarray Output array, containing the indices of the elements of arr.ravel() that are non-zero. Code #1 : Wor 1 min read numpy.fromiter() function â Python NumPy's fromiter() function is a handy tool for creating a NumPy array from an iterable object. This iterable can be any Python object that provides elements one at a time. The function is especially useful when you need to convert data from a custom data source, like a file or generator, into a Num 2 min read Numpy MaskedArray.filled() method - Python numpy.MaskedArray.filled() function return a copy of self, with masked values filled with a given value. However, if there are no masked values to fill, self will be returned instead as an ndarray. Syntax : numpy.MaskedArray.filled(self, fill_value = None) Parameters : fill_value : [scalar, optional 2 min read numpy.around() in Python numpy.around(arr, decimals = 0, out = None) : This mathematical function helps user to evenly round array elements to the given number of decimals. Parameters : array : [array_like] Input array. decimal : [int, optional] Decimal places we want to round off. Default = 0. In case of -ve decimal, it sp 2 min read numpy.ndarray.flat() in Python The numpy.ndarray.flat() function is used as a 1_D iterator over N-dimensional arrays. It is not a subclass of, Pythonâs built-in iterator object, otherwise it a numpy.flatiter instance. Syntax : numpy.ndarray.flat() Parameters : index : [tuple(int)] index of the values to iterate Return :  1-D i 3 min read Numpy ndarray.flatten() function in Python The flatten() function is used to convert a multi-dimensional NumPy array into a one-dimensional array. It creates a new copy of the data so that original array stays unchanged. If your array has rows and columns or even more dimensions, then flatten() line up every single value into a straight list 3 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 numpy.argmin() in Python The numpy.argmin() method returns indices of the min element of the array in a particular axis. Syntax : numpy.argmin(array, axis = None, out = None) Parameters : array : Input array to work on axis : [int, optional]Along a specified axis like 0 or 1 out : [array optional]Provides a feature to inser 2 min read Numpy recarray.flatten() function | Python In numpy, arrays may have a data-types containing fields, analogous to columns in a spreadsheet. An example is [(a, int), (b, float)], where each entry in the array is a pair of (int, float). Normally, these attributes are accessed using dictionary lookups such as arr['a'] and arr['b']. Record array 3 min read Like