Skip to main content

mgrid

Function mgrid 

Source
pub fn mgrid(ranges: &[(f64, f64, f64)]) -> FerrayResult<Vec<Array<f64, IxDyn>>>
Expand description

Create a dense multi-dimensional “meshgrid” with matrix (‘ij’) indexing.

Analogous to numpy.mgrid[start:stop:step, ...].

Takes a slice of (start, stop, step) tuples, one per dimension. Returns a vector of arrays, one per dimension.

§Errors

Returns FerrayError::InvalidValue if any step is zero.