W3cubDocs

/NumPy 2.4

numpy.ufunc.identity

attribute

ufunc.identity

The identity value.

Data attribute containing the identity element for the ufunc, if it has one. If it does not, the attribute value is None.

Examples

>>> import numpy as np
>>> np.add.identity
0
>>> np.multiply.identity
1
>>> print(np.power.identity)
None
>>> print(np.exp.identity)
None

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