numpy.number.__class_getitem__#
method
- number.__class_getitem__(item, /)#
Return a parametrized wrapper around the
numbertype.在 1.22 版本加入.
- Returns:
- aliastypes.GenericAlias
A parametrized
numbertype.
参见
- PEP 585
Type hinting generics in standard collections.
Examples
>>> from typing import Any >>> import numpy as np
>>> np.signedinteger[Any] numpy.signedinteger[typing.Any]