jax.numpy.meshgridΒΆ
-
jax.numpy.
meshgrid
(*args, **kwargs)[source]ΒΆ Return coordinate matrices from coordinate vectors.
LAX-backend implementation of
meshgrid()
.Original docstring below.
Make N-D coordinate arrays for vectorized evaluations of N-D scalar/vector fields over N-D grids, given one-dimensional coordinate arrays x1, x2,β¦, xn.
Changed in version 1.9: 1-D and 0-D cases are allowed.
- Parameters
indexing ({'xy', 'ij'}, optional) β Cartesian (βxyβ, default) or matrix (βijβ) indexing of output. See Notes for more details.
sparse (bool, optional) β If True a sparse grid is returned in order to conserve memory. Default is False.
copy (bool, optional) β If False, a view into the original arrays are returned in order to conserve memory. Default is True. Please note that
sparse=False, copy=False
will likely return non-contiguous arrays. Furthermore, more than one element of a broadcast array may refer to a single memory location. If you need to write to the arrays, make copies first.
- Returns
X1, X2,β¦, XN β For vectors x1, x2,β¦, βxnβ with lengths
Ni=len(xi)
, return(N1, N2, N3,...Nn)
shaped arrays if indexing=βijβ or(N2, N1, N3,...Nn)
shaped arrays if indexing=βxyβ with the elements of xi repeated to fill the matrix along the first dimension for x1, the second for x2 and so on.- Return type