chainerx.identity¶
- chainerx.identity(n, dtype=None, device=None)¶
Returns a 2-D identity array.
It is equivalent to
eye(n, n, dtype)
.- Parameters
n (int) – Number of rows and columns.
dtype – Data type.
device (Device) – Device on which the array is allocated. If omitted, the default device is chosen.
- Returns
A 2-D identity array.
- Return type
See also