From 6da29941b40d933cd6e6dd4c9b5738d7a78e8ba6 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 2 Nov 2021 15:11:59 +0000 Subject: [PATCH 1/2] Modify `meshgrid()` so arrays must share the same dtype --- spec/API_specification/creation_functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/API_specification/creation_functions.md b/spec/API_specification/creation_functions.md index 6cb52aea0..2c35a0569 100644 --- a/spec/API_specification/creation_functions.md +++ b/spec/API_specification/creation_functions.md @@ -322,7 +322,7 @@ Returns coordinate matrices from coordinate vectors. - **arrays**: _<array>_ - - an arbitrary number of one-dimensional arrays representing grid coordinates. Must have numeric data types. + - an arbitrary number of one-dimensional arrays representing grid coordinates. Each array must have the same numeric data type. - **indexing**: _str_ @@ -342,7 +342,7 @@ Returns coordinate matrices from coordinate vectors. Similarly, for the three-dimensional case with input one-dimensional arrays of length `M`, `N`, and `P`, if matrix indexing `ij`, then each returned array must have shape `(M, N, P)`, and, if Cartesian indexing `xy`, then each returned array must have shape `(N, M, P)`. - The returned arrays must have a numeric data type determined by {ref}`type-promotion`. + Each returned array must have the same data type as the input arrays. (function-ones)= ### ones(shape, *, dtype=None, device=None) From 2352c71110ec4f166498aa4305058e4cd8c84ee3 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 2 Nov 2021 15:50:39 +0000 Subject: [PATCH 2/2] must -> should for dtype behaviour in `meshgrid()` --- spec/API_specification/creation_functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/API_specification/creation_functions.md b/spec/API_specification/creation_functions.md index 2c35a0569..20ab43ba5 100644 --- a/spec/API_specification/creation_functions.md +++ b/spec/API_specification/creation_functions.md @@ -322,7 +322,7 @@ Returns coordinate matrices from coordinate vectors. - **arrays**: _<array>_ - - an arbitrary number of one-dimensional arrays representing grid coordinates. Each array must have the same numeric data type. + - an arbitrary number of one-dimensional arrays representing grid coordinates. Each array should have the same numeric data type. - **indexing**: _str_ @@ -342,7 +342,7 @@ Returns coordinate matrices from coordinate vectors. Similarly, for the three-dimensional case with input one-dimensional arrays of length `M`, `N`, and `P`, if matrix indexing `ij`, then each returned array must have shape `(M, N, P)`, and, if Cartesian indexing `xy`, then each returned array must have shape `(N, M, P)`. - Each returned array must have the same data type as the input arrays. + Each returned array should have the same data type as the input arrays. (function-ones)= ### ones(shape, *, dtype=None, device=None)