-
Notifications
You must be signed in to change notification settings - Fork 748
best way to convert ndarray to a .net #652
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
Comments
In CoreCLR 2.1 we have Span API so I think is could be many times faster approach. |
@dmitriyse that's what I was thinking too, but the suggestion i linked above was good enough for me. |
I tried a couple of the approaches in that link and they didn't work for me. I am guessing I have a ndarray(2D) vs a single D array is the issue, those approaches might work for a single d numpy array. I haven't tried the pure python solution at the very end, but either way I think I can get around this. Thanks! Edit:- The python code from Robert McLeod in the above link worked great, Thanks! |
I've added answer alongside with Robert McLeod for c# side |
Is there a efficient way to convert numpy.ndarray to a .net object (array/list) ? I have a 2D ndarray that is pretty massive 1500 *2000, is there a efficient way to convert to .net
Also this pythonnet package has helped me greatly, thanks for all your efforts in developing and maintaining it!
The text was updated successfully, but these errors were encountered: