numpy.dtype.__class_getitem__#
method
- dtype.__class_getitem__(item, /)#
 Return a parametrized wrapper around the
dtypetype.New in version 1.22.
- Returns:
 - aliastypes.GenericAlias
 A parametrized
dtypetype.
See also
- PEP 585
 Type hinting generics in standard collections.
Examples
>>> import numpy as np
>>> np.dtype[np.int64] numpy.dtype[numpy.int64]