Skip to content

Commit d933e48

Browse files
committed
add meshgrid to creation functions
1 parent c6d5918 commit d933e48

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

spec/API_specification/creation_functions.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,33 @@ Returns evenly spaced numbers over a specified interval.
289289
290290
- a one-dimensional array containing evenly spaced values.
291291
292+
(function-meshgrid)=
293+
### meshgrid(x, /, *, indexing='xy')
294+
295+
Returns coordinate matrices from coordinate vectors.
296+
297+
### Special cases
298+
299+
- For `n` one dimensional arrays `x1, x2, ..., xn` with lengths `Ni = len(xi)`, this function returns `(N1, N2, N3, ..., Nn)` shaped arrays if the indexing is 'ij' or `(N2, N1, N3, ..., Nn)` shaped arrays if indexing 'xy'.
300+
301+
- The 0-D and 1-D case, the indexing keyword has no effect.
302+
303+
### Parameters
304+
305+
- **x**: _<array>_
306+
307+
- One dimensional array representing the coordinates of the grid.
308+
309+
- **indexing**: _Optional\[str]_
310+
311+
- Cartesian 'xy' by default or 'ij' for matrix indexing of the output.
312+
313+
### Returns
314+
315+
- **out**: _\[<array>\]_
316+
317+
- List of N arrays with rank N.
318+
292319
(function-ones)=
293320
### ones(shape, /, *, dtype=None, device=None)
294321

0 commit comments

Comments
 (0)