dpctl.tensor.meshgrid¶
- dpctl.tensor.meshgrid(*arrays, indexing='xy')[source]¶
Creates list of
dpctl.tensor.usm_ndarraycoordinate matrices from vectors.- Parameters:
arrays (usm_ndarray) – an arbitrary number of one-dimensional arrays representing grid coordinates. Each array should have the same numeric data type.
indexing (
"xy", or"ij") – 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:
list of
Narrays, whereNis the number of provided one-dimensional input arrays. Each returned array must have rankN. For a set ofnvectors with lengthsN0,N1,N2, … The cartesian indexing results in arrays of shape(N1, N0, N2, ...), while the matrix indexing results in arrays of shape(N0, N1, N2, ...). Default:"xy".- Return type:
List[array]
- Raises:
ValueError – If vectors are not of the same data type, or are not one-dimensional.