rust-ndarray / ndarray

ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations

Home Page:https://docs.rs/ndarray/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementation of numpy's meshgrid function for ndarray

jreniel opened this issue · comments

I have made an attempt to try to replicate the core functionality of numpy's meshgrid function, using ndarray.
My attempt, which seems to be yielding identical results to the numpy version is hosted here.

My hope is that this function, or an equivalent, makes it to ndarray, since I feel like meshgrid is one of those core numpy functions that we tend to use repeatedly in my field, and it would be an invaluable addition to the ndarray crate.

To be clear, I'm asking to not necessarily use the same function that I've posted here, I'll be happy too if the ndarray devs implement a better solution. All I would like to see is to have this function be a part of the ndarray collection of functions.