Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: example converting to ndarray #59

Closed
drewm1980 opened this issue Sep 24, 2018 · 3 comments
Closed

Feature request: example converting to ndarray #59

drewm1980 opened this issue Sep 24, 2018 · 3 comments

Comments

@drewm1980
Copy link

We're experiencing a lot of friction just figuring out how to get our data all of the way out of a pyarray.

rust-ndarray/ndarray#493

I suspect the ergonomics could be improved (or better documented) in the ndarray crate, but since this might be a more common pain point for new users of rust-numpy (compared to people just learning ndarray in isolation), I thought I'd mention it here as well.

New users of the ndarray crate are probably going to start out with owned arrays of static number of dimensions, whereas a numpy users starting from the rust-numpy example get handed an array of dynamic dimensions and non-owned data with lifetime bound to the python interpreter. I imagine that would be nice for performance if we ever manage to get our code to compile, but for a numpy user trying to get up to speed in rust, it really throws you into the deep end of the pool.

Thanks!

@kngwyu
Copy link
Member

kngwyu commented Sep 25, 2018

We're experiencing a lot of friction just figuring out how to get our data all of the way out of a pyarray.

Thanks for reporting!
I'm going to write some examples soon.

Also, I want to enhance converting APIs' ergonomics entirely, though I don't have a concrete roadmap now.

@kngwyu
Copy link
Member

kngwyu commented Oct 31, 2018

I made 2 examples(as_array, to_owned_array).

@drewm1980
Please let me know if you want additional examples 🙂

@rth
Copy link
Contributor

rth commented Jun 13, 2019

Looks like this issue was resolved and can be closed?

@kngwyu kngwyu closed this as completed Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants