From 05b00f4d15eb978de62f6c7e70d3352eb2d3f290 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Sun, 22 May 2022 20:30:36 -0700 Subject: [PATCH] Add note concerning complex number output arrays to `eye` --- spec/API_specification/array_api/creation_functions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/API_specification/array_api/creation_functions.py b/spec/API_specification/array_api/creation_functions.py index 65244cf97..3a5c8d754 100644 --- a/spec/API_specification/array_api/creation_functions.py +++ b/spec/API_specification/array_api/creation_functions.py @@ -112,6 +112,9 @@ def eye(n_rows: int, n_cols: Optional[int] = None, /, *, k: int = 0, dtype: Opti """ Returns a two-dimensional array with ones on the ``k``\th diagonal and zeros elsewhere. + .. note:: + 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. + Parameters ---------- n_rows: int