Skip to content

Commit 454398d

Browse files
authored
Add note concerning complex number output arrays to eye (#436)
1 parent 7ee81a5 commit 454398d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: spec/API_specification/array_api/creation_functions.py

+3
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ def eye(n_rows: int, n_cols: Optional[int] = None, /, *, k: int = 0, dtype: Opti
112112
"""
113113
Returns a two-dimensional array with ones on the ``k``\th diagonal and zeros elsewhere.
114114
115+
.. note::
116+
An output array having a complex floating-point data type must have the value ``1 + 0j`` along the ``k``\th diagonal and ``0 + 0j`` elsewhere.
117+
115118
Parameters
116119
----------
117120
n_rows: int

0 commit comments

Comments
 (0)