dpnp.identity

dpnp.identity(n, dtype=None, *, like=None)[source]

Return the identity array.

The identity array is a square array with ones on the main diagonal.

For full documentation refer to numpy.identity.

Limitations

Parameter like is currently not supported .

Examples

>>> import dpnp as np
>>> np.identity(3)
array([[1.,  0.,  0.],
       [0.,  1.,  0.],
       [0.,  0.,  1.]])