-
Notifications
You must be signed in to change notification settings - Fork 129
Closed
Description
Tests resize_using_exclusive_borrow and src/borrow/mod.rs - borrow::PyReadwriteArray<'py,T,Ix1>::resize (line 611) fail with numpy 2.4.0.
$ git clone https://github.com/PyO3/rust-numpy.git
$ cd rust-numpy
$ uv venv
$ . .venv/bin/activate
(rust-numpy) $ uv pip install numpy
Resolved 1 package in 40ms
Installed 1 package in 19ms
+ numpy==2.4.0
(rust-numpy) $ cargo test --test borrow
[…]
test resize_using_exclusive_borrow ... FAILED
[…]
Traceback (most recent call last):
File "<string>", line 1, in <module>
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: AlreadyBorrowed
[…]
failures:
---- resize_using_exclusive_borrow stdout ----
thread 'resize_using_exclusive_borrow' (755936) panicked at tests/borrow.rs:347:41:
called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'ValueError'>, value: ValueError('cannot resize an array that references or is referenced\nby another array in this way.\nUse the np.resize function or refcheck=False'), traceback: None }
failures:
resize_using_exclusive_borrow
test result: FAILED. 19 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s
error: test failed, to rerun pass `--test borrow`
(rust-numpy) $ cargo test --doc
[…]
failures:
---- src/borrow/mod.rs - borrow::PyReadwriteArray<'py,T,Ix1>::resize (line 611) stdout ----
Test executable failed (exit status: 101).
stderr:
thread 'main' (756617) panicked at src/borrow/mod.rs:13:39:
called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'ValueError'>, value: ValueError('cannot resize an array that references or is referenced\nby another array in this way.\nUse the np.resize function or refcheck=False'), traceback: None }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
src/borrow/mod.rs - borrow::PyReadwriteArray<'py,T,Ix1>::resize (line 611)
test result: FAILED. 54 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 2.57s
error: doctest failed, to rerun pass `--doc`
decathorpe
Metadata
Metadata
Assignees
Labels
No labels