rust-numpy
rust-numpy copied to clipboard
PyO3-based Rust bindings of the NumPy C-API
Hi, I am building a Rust dynamic library embedding Python using rust-numpy. My project allows me to build a pure Rust binary, a C binary loading the Rust library and...
This does not support polymorphic universal functions, but the numbers of inputs and outputs are arbitrary. Closes #399
Add support for writing custom NumPy ufuncs in Rust. ### Discussed in https://github.com/PyO3/rust-numpy/discussions/398 Originally posted by **mhostetter** October 29, 2023 Is it possible to write a custom NumPy ufunc in...
Hey, I want to write some Rust algorithms that operate on a numpy array that was created in python. E.g.: ```py arr = np.ones((1000, 768)) dataset = MyRustWrapper(arr) # Rust...
I find https://docs.rs/numpy/latest/numpy/array/struct.PyArray.html#method.from_slice by it copy the memory.
This is the first iteration of the process to update to pyo3 0.22. The first step is to make the current code compile against the new version. In following MR...
Bumps py03 to 0.22.0 https://github.com/PyO3/pyo3/releases/tag/v0.22.0
The changes are based on recommendations from https://numpy.org/devdocs/numpy_2_0_migration_guide.html#c-api-changes. The most visible user-facing change is the addition of two feature flags (`numpy-1` and `numpy-2`). By default, both features are enabled and...
I'm attempting to make a function in rust-pyo3 that takes in an np.array[np.str_] but I don't want to fix the size of the string to a particular value. How do...
Fixes #438