Skip to content

Is there any way to use np.meshgrid(x,y) in ndarray ? #1231

Answered by zgbkdlm
mdrokz asked this question in Q&A
Discussion options

You must be logged in to vote

You need to use itertools.cartesian_product in https://docs.rs/itertools/latest/itertools/trait.Itertools.html#method.cartesian_product.

Then convert the iterator to the ndarray by the method from_iter.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by mdrokz
Comment options

You must be logged in to vote
1 reply
@bluss
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants