Skip to main content

meshgrid

Function meshgrid 

Source
pub fn meshgrid(
    arrays: &[Array<f64, Ix1>],
    indexing: &str,
) -> FerrayResult<Vec<Array<f64, IxDyn>>>
Expand description

Return coordinate arrays from coordinate vectors.

Analogous to numpy.meshgrid(*xi, indexing='xy').

Given N 1-D arrays, returns N N-D arrays, where each output array has the shape (len(x1), len(x2), ..., len(xN)) for ‘xy’ indexing or (len(x1), ..., len(xN)) transposed for ‘ij’ indexing.

indexing should be "xy" (default Cartesian) or "ij" (matrix).

§Errors

Returns FerrayError::InvalidValue if indexing is not "xy" or "ij", or if there are fewer than 2 input arrays.