NumPy

Previous topic

numpy.dtype.alignment

Next topic

numpy.dtype.__reduce__

This is documentation for an old release of NumPy (version 1.18). Read this page in the documentation of the latest stable release (version 2.2).

numpy.dtype.base

attribute

dtype.base

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

See also

dtype.subdtype

Examples

>>>
>>> x = numpy.dtype('8f')
>>> x.base
dtype('float32')
>>>
>>> x =  numpy.dtype('i2')
>>> x.base
dtype('int16')