ndarray icon indicating copy to clipboard operation
ndarray copied to clipboard

python bindings

Open xd009642 opened this issue 6 years ago • 3 comments
trafficstars

https://github.com/dgrunwald/rust-cpython allows users to return numpy arrays from rust bindings with the Buffer type. It could be nice to add rust-cpython as an optional feature so that those of us creating python bindings for our more python-centric colleagues can do so with no fuss :+1:

I'm looking into implementing this for one of my projects so would be willing to adapt this to a PR once I've figured it out

xd009642 avatar Nov 04 '19 20:11 xd009642

Does the numpy crate meet your needs? It provides conversions between NumPy arrays and ndarray arrays. This example of writing a Python module in Rust sounds like what you're looking for.

jturner314 avatar Nov 05 '19 00:11 jturner314

That looks like it does I'll try it tonight 👍

xd009642 avatar Nov 05 '19 07:11 xd009642

Maybe it make sense to add link in readme or docs?

burrbull avatar Nov 12 '19 16:11 burrbull