W3cubDocs

/NumPy 2.4

numpy.ufunc.ntypes

attribute

ufunc.ntypes

The number of types.

The number of numerical NumPy types - of which there are 18 total - on which the ufunc can operate.

Examples

>>> import numpy as np
>>> np.add.ntypes
22
>>> np.multiply.ntypes
23
>>> np.power.ntypes
21
>>> np.exp.ntypes
10
>>> np.remainder.ntypes
16

© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/generated/numpy.ufunc.ntypes.html