dpnp.tensor.meshgrid¶
- dpnp.tensor.meshgrid(*arrays, indexing='xy')[source]¶
Creates tuple of
dpnp.tensor.usm_ndarraycoordinate matrices from vectors.- Parameters:
*arrays (usm_ndarray) -- an arbitrary number of one-dimensional usm_ndarrays representing grid coordinates. Each array should have the same numeric data type.
indexing ({"xy", "ij"}, optional) --
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), theindexingkeyword has no effect and should be ignored.Default:
"xy".
- Returns:
out -- tuple of
Nusm_ndarrays, whereNis the number of provided one-dimensional input usm_ndarrays. Each returned array must have rankN. For a set ofnvectors with lengthsN0,N1,N2, ... The cartesian indexing results in usm_ndarrays of shape(N1, N0, N2, ...), while the matrix indexing results in usm_ndarrays of shape(N0, N1, N2, ...).- Return type:
tuple of usm_ndarrays
- Raises:
ValueError -- If vectors are not of the same data type, or are not one-dimensional.