I'm working on a GUI-based application. It's written in Python and uses numpy for handing images around and doing processing on them.
I have some Rust code that uses ndarray, that I'd like to use for processing under the hood. I'm only interested in calling Rust code from Python -- not the other way around.
Typically, I expect to be calling Rust functions from Python code with arguments that may contain arrays, and getting responses that may themselves contain arrays. It would be nice if the translation from numpy array to ndarray and back were seamless.
Is there a "best" crate for this? Searches come up with pyO3 and cpython -- is there a clear winner between these for my purposes, or a third contender that I haven't encountered?