numpy.dtype.subdtype() function – Python Last Updated : 18 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report numpy.dtype.subdtype() function returns Tuple(item_dtype, shape) if this dtype describes a sub-array, and None otherwise. Syntax : numpy.dtype.subdtype(type) type : [dtype] The input data-type. Return : Return Tuple(item_dtype, shape) if this dtype describes a sub-array, and None otherwise. Code #1 : Python3 # Python program explaining # numpy.dtype.subdtype() function # importing numpy as geek import numpy as geek x = geek.dtype('8f') gfg = x.subdtype print (gfg) Output : (dtype('float32'), (8, )) Code #2 : Python3 # Python program explaining # numpy.dtype.subdtype() function # importing numpy as geek import numpy as geek x = geek.dtype('i2') gfg = x.subdtype print (gfg) Output : None Comment More infoAdvertise with us Next Article numpy.dtype.subdtype() function – Python S sanjoy_62 Follow Improve Article Tags : Python Python-numpy Practice Tags : python Similar Reads numpy.result_type() function â Python numpy.result_type() function returns the type that results from applying the NumPy type promotion rules to the arguments. NumPy type promotion by example : Suppose calculating 3*arr, where arr is an array of 32-bit floats, intuitively should result in a 32-bit float output. If the 3 is a 32-bit inte 1 min read numpy.dtype.base() function - Python numpy.dtype.base() function returns dtype for the base element of the subarrays, regardless of their dimension or shape. Syntax : numpy.dtype.base() Return : Returns data type of the base element. Code #1 : Python3 # Python program explaining # numpy.dtype.base() function # importing numpy as geek i 1 min read numpy.dtype.kind() function â Python numpy.dtype.kind() function determine the character code by identifying the general kind of data. Syntax : numpy.dtype.kind(type) Parameters : type : [dtype] The input data-type. Return : Return the character code by identifying the general kind of data. Code #1 : Python3 # Python program explaining 1 min read numpy.typename() function â Python numpy.typename() function return a description for the given data type code. Syntax : numpy.typename(char) Parameters : char : [str] Data type code. Return : [str] Description of the input data type code. Code #1 : Python3 # Python program explaining # numpy.typename() function # importing numpy as 2 min read numpy.sctype2char() function â Python numpy.sctype2char() function return the string representation of a scalar dtype. Syntax : numpy.sctype2char(sctype) Parameters : sctype : [scalar dtype or object] If a sctype is a scalar dtype, the corresponding string character is returned. If an object, sctype2char tries to infer its scalar type a 1 min read Like