SciPy

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

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

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

Previous topic

numpy.ufunc.types

Next topic

numpy.ufunc.signature