You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/API_specification/creation_functions.md
+31
Original file line number
Diff line number
Diff line change
@@ -289,6 +289,37 @@ Returns evenly spaced numbers over a specified interval.
289
289
290
290
- a one-dimensional array containing evenly spaced values.
291
291
292
+
(function-meshgrid)=
293
+
### meshgrid(*arrays, /, *, indexing='xy')
294
+
295
+
Returns coordinate matrices from coordinate vectors.
296
+
297
+
#### Parameters
298
+
299
+
- **arrays**: _Sequence\[ <array> ]_
300
+
301
+
- one-dimensional arrays representing grid coordinates. Must have a numeric data type.
302
+
303
+
- **indexing**: _str_
304
+
305
+
- Cartesian 'xy' or matrix 'ij' indexing of output. If provided zero or one one-dimensional vector(s) (i.e., the zero- and one-dimensional cases, respectively), the `indexing` keyword has no effect and should be ignored. Default: `'xy'`.
306
+
307
+
#### Returns
308
+
309
+
- **out**: _List\[ <array>, ... ]_
310
+
311
+
- list of N arrays, where `N` is the number of provided one-dimensional input arrays. Each returned array must have rank `N`. For `N` one-dimensional arrays having lengths `Ni = len(xi)`,
312
+
313
+
- if matrix indexing `ij`, then each returned array must have the shape `(N1, N2, N3, ..., Nn)`.
314
+
315
+
- if Cartesian indexing `xy`, then each returned array must have shape `(N2, N1, N3, ..., Nn)`.
316
+
317
+
Accordingly, for the two-dimensional case with input one-dimensional arrays of length `M` and `N`, if matrix indexing `ij`, then each returned array must have shape `(M, N)`, and, if Cartesian indexing `xy`, then each returned array must have shape `(N, M)`.
318
+
319
+
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)`.
320
+
321
+
The returned arrays must have a numeric data type determined by {ref}`type-promotion`.
0 commit comments