numpy.dtype.base — NumPy v2.6.dev0 Manual

attribute

dtype.base

#

Returns dtype for the base element of the subarrays, regardless of their dimension or shape.

Examples

>>> importnumpyasnp>>> x=np.dtype('8f')>>> x.basedtype('float32')>>> x=np.dtype(np.int16)>>> x.basedtype('int16')