numpy.alen() in Python Last Updated : 28 Dec, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 # input array(2 * 3) in_arr = geek.array([[ 2, 0, 7], [ 0, 5, 9]]) print ("Input array : ", in_arr) out_dim = geek.alen(in_arr) print ("Length of the first dimension of arr: ", out_dim) Output: Input array : [[2, 0, 7], [0, 5, 9]] Length of the first dimension of arr: 2 Code #2 : Python3 # Python program explaining # alen() function import numpy as geek # input array(1 * 3*3) in_arr = geek.arange(9).reshape(1, 3, 3) print ("Input array : \n", in_arr) out_dim = geek.alen(in_arr) print ("Length of the first dimension of arr: ", out_dim) Output: Input array : [[[0 1 2] [3 4 5] [6 7 8]]] Length of the first dimension of arr: 1 Comment More infoAdvertise with us Next Article numpy.isnan() in Python J jana_sayantan Follow Improve Article Tags : Python Python-numpy Python numpy-arrayManipulation Practice Tags : python Similar Reads numpy.angle() in Python numpy.angle() function is used when we want to compute the angle of the complex argument. A complex number is represented by â x + yi " where x and y are real number and i= (-1)^1/2. The angle is calculated by the formula tan-1(x/y). Syntax : numpy.angle(z, deg=0) Parameters : z : [array_like] A com 2 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.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.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.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 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 Like