rust-numpy icon indicating copy to clipboard operation
rust-numpy copied to clipboard

PyO3-based Rust bindings of the NumPy C-API

Results 48 rust-numpy issues
Sort by recently updated
recently updated
newest added

Hi there, # Context We’ve encountered an issue while using the rust-numpy crate in conjunction with the pyo3 [multiple-pymethods](https://pyo3.rs/v0.23.2/features.html#multiple-pymethods) feature in one of our internal projects. This feature is essential...

my code: ```rust let inverted = test .call1(PyTuple::new_bound(py, &[a])) .unwrap() .downcast_into::() .unwrap(); println!( "inverted shape: {:?}, len: {}", inverted.shape(), inverted.len() ); let v = inverted.to_vec().unwrap(); println!("inverted vector size: {:?}", v.len());...

I tried to write Python bindings for a struct containing `ndarray` type fields, but it does not compile: (`rust-numpy` v0.22.0) ```Rust use pyo3::prelude::*; use pyo3::{pymodule, Bound, PyResult}; use numpy::ndarray::Array2; #[pyclass(get_all,...

This pull request attempts to resolve issue #444. ### Current behavior When `PyArrayLike1` is used, arrays constructed using `np.array([...], dtype='float64')` are converted implicitly to `f32`. This results in a new...

- bumps various GH actions to the latest version - bumps the Python version for various steps to 3.14 - runs on `macOS-latest` by default, falling back to `macos-15-intel` for...

CI-no-fail-fast

Thank you for pyo3. Using pyo3, when my python code sends the wrong shape (can typically happen given python's dynamic typing during any development work) I get a python backtrace...

enhancement

`PyArray1::::as_slice` returns a `&[bool]`, but the underlying data may not at all be valid for Rust's `bool`, creating instant undefined behavior. For example ```python >>> a = np.uint8([24, 15, 32,...

Numpy v2 added a new [variable-width string data type](https://numpy.org/doc/stable/user/basics.strings.html#variable-width-strings). This is much more performant than variable-width string arrays in Numpy v1 because those stored a Python `str` for every element....