numpy.amin() in Python Last Updated : 28 Apr, 2022 Comments Improve Suggest changes Like Article Like Report The numpy.amin() function returns minimum of an array or minimum along axis(if mentioned). Syntax : numpy.amin(arr, axis = None, out = None, keepdims = <class numpy._globals._NoValue>) Parameters : arr : [array_like]input dataaxis : [int or tuples of int]axis along which we want the min value. Otherwise, it will consider arr to be flattened.out : [ndarray, optional]Alternative output array in which to place the resultkeepdims : [boolean, optional]If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. If the default value is passed, then keepdims will not be passed through to the all method of sub-classes of ndarray, however any non-default value will be. If the sub-classes sum method does not implement keepdims any exceptions will be raised. Return : Minimum of array - arr[ndarray or scalar], scalar if axis is None; the result is an array of dimension a.ndim - 1, if axis is mentioned. Code - Python # Python Program illustrating # numpy.amin() method import numpy as geek # 1D array arr = geek.arange(8) print("arr : ", arr) print("Min of arr : ", geek.amin(arr)) # 2D array arr = geek.arange(10).reshape(2, 5) print("\narr : ", arr) # Minimum of the flattened array print("\nMin of arr, axis = None : ", geek.amin(arr)) # Minimum along the first axis # axis 0 means vertical print("Min of arr, axis = 0 : ", geek.amin(arr, axis = 0)) # Minimum along the second axis # axis 1 means horizontal print("Min of arr, axis = 1 : ", geek.amin(arr, axis = 1)) Output - arr : [0 1 2 3 4 5 6 7] Min of arr : 0 arr : [[0 1 2 3 4] [5 6 7 8 9]] Min of arr, axis = None : 0 Min of arr, axis = 0 : [0 1 2 3 4] Min of arr, axis = 1 : [0 5] References - https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.amin.html#numpy.amin Note - These codes won't run on online IDE's. So please, run them on your systems to explore the working. Comment More infoAdvertise with us Next Article numpy.amin() in Python M Mohit Gupta_OMG Improve Article Tags : Python Practice Tags : python Similar Reads numpy.alen() in Python numpy.alen() function is used to return the length of the first dimension of the input array. Syntax : numpy.alen(arr) Parameters : arr : [array_like] Input array. Return : [int]Length of the first dimension of arr. Code #1 : Python3 # Python program explaining # alen() function import numpy as geek 1 min read numpy.find() in Python numpy.core.defchararray.find(arr, substring, start=0, end=None): Finds the lowest index of the sub-string in the specified range. Parameters: arr : array-like or string to be searched. substring : substring to search for. start, end : [int, optional] Range to search in. Returns : An integer array wi 1 min read numpy.isnan() in Python The numpy.isnan() function tests element-wise whether it is NaN or not and returns the result as a boolean array. Syntax :Â numpy.isnan(array [, out]) Parameters :Â array : [array_like]Input array or object whose elements, we need to test for infinity out : [ndarray, optional]Output array placed wit 2 min read numpy.index() in Python numpy.core.defchararray.index(arr, substring, start=0, end=None): Finds the lowest index of the sub-string in the specified range But if substring is not found, it raises ValueError. Parameters: arr : array-like or string to be searched. substring : substring to search for. start, end : [int, option 1 min read numpy.add() in Python NumPy, the Python powerhouse for scientific computing, provides an array of tools to efficiently manipulate and analyze data. Among its key functionalities lies numpy.add() a potent function that performs element-wise addition on NumPy arrays. numpy.add() SyntaxSyntax :Â numpy.add(arr1, arr2, /, out= 4 min read numpy.arange() in Python numpy.arange() function creates an array of evenly spaced values within a given interval. It is similar to Python's built-in range() function but returns a NumPy array instead of a list. Let's understand with a simple example:Pythonimport numpy as np #create an array arr= np.arange(5 , 10) print(arr 2 min read numpy.fabs() in Python numpy.fabs() function is used to compute the absolute values element-wise. This function returns the absolute values (positive magnitude) of the data in arr. It always return absolute values in floats. Syntax : numpy.fabs(arr, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, u 2 min read NumPy Array in Python NumPy (Numerical Python) is a powerful library for numerical computations in Python. It is commonly referred to multidimensional container that holds the same data type. It is the core data structure of the NumPy library and is optimized for numerical and scientific computation in Python. Table of C 2 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 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 Like