Python | Numpy np.can_cast() method Last Updated : 03 Nov, 2019 Comments Improve Suggest changes Like Article Like Report With the help of np.can_cast() method, we can get the perfect idea that one data type can be able to cast into another data type or not by using np.can_cast() method. Syntax : np.can_cast(source data_type, target data_type) Return : Return the boolean value as true when casting can be done else false. Example #1 : In this example we can see that by using np.can_cast() method, we are able to get the boolean value as true when casting can be performed else false by using this method. Python3 1== # import numpy import numpy as np # using np.can_cast() method gfg = np.can_cast(np.int32, np.int64) print(gfg) Output : True Example #2 : Python3 1== # import numpy import numpy as np # using np.can_cast() method gfg = np.can_cast(5.5e10, np.int32) print(gfg) Output : False Comment More infoAdvertise with us Next Article Python | Numpy np.can_cast() method J Jitender_1998 Follow Improve Article Tags : Technical Scripter Python Python-numpy Python numpy-arrayManipulation Practice Tags : python Similar Reads numpy.any() in Python The numpy.any() function tests whether any array elements along the mentioned axis evaluate to True. Syntax : numpy.any(a, axis = None, out = None, keepdims = class numpy._globals._NoValue at 0x40ba726c) Parameters : array :[array_like]Input array or object whose elements, we need to test. axis : 3 min read numpy.mintypecode() function â Python numpy.mintypecode() function return the character for the minimum-size type to which given types can be safely cast. Syntax : numpy.mintypecode(typechars, typeset = 'GDFgdf', default = 'd') Parameters : typechars : [list of str or array_like] If a list of strings, each string should represent a dtyp 1 min read numpy.iinfo() function â Python numpy.iinfo() function shows machine limits for integer types. Syntax : numpy.iinfo(dtype) Parameters : dtype : [integer type, dtype, or instance] The kind of integer data type to get information about. Return : Machine limits for integer types. Code #1 : Python3 # Python program explaining # numpy. 1 min read numpy.isfinite() in Python The numpy.isfinite() function tests element-wise whether it is finite or not(not infinity or not Not a Number) and return the result as a boolean array. Syntax : numpy.isfinite(array [, out]) Parameters : array : [array_like]Input array or object whose elements, we need to test for infinity out : 2 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.isneginf() in Python The numpy.isneginf() function tests element-wise whether it is negative infinity or not, and returns the result as a boolean array. Syntax :  numpy.isneginf(array, y = None) Parameters : array : [array_like]Input array or object whose elements, we need to test for infinity. y : [array_like]A boole 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.isposinf() in Python The numpy.isposinf() function tests element-wise whether it is positive infinity or not and returns the result as a boolean array. Syntax : numpy.isposinf(array, y = None) Parameters:  array : [array_like]Input array or object whose elements, we need to test for infinity. y : [array_like]A boolea 2 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 Python | Numpy np.min_scalar_type() method With the help of np.min_scalar_type() method, we can get the minimum scalar type of a value that is passed as a parameter in np.min_scalar_type() method. Syntax : np.min_scalar_type(value) Return : Return the minimum scalar type of a value. Example #1 : In this example we can see that by using np.mi 1 min read Like