MCPcopy Create free account
hub / github.com/PyO3/rust-numpy / into_pyarray_cannot_resize

Function into_pyarray_cannot_resize

tests/to_py.rs:148–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146
147#[test]
148fn into_pyarray_cannot_resize() {
149 Python::attach(|py| {
150 let arr = vec![1, 2, 3].into_pyarray(py);
151
152 unsafe {
153 assert!(arr.resize(100).is_err());
154 }
155 });
156}
157
158#[test]
159fn into_pyarray_can_write() {

Callers

nothing calls this directly

Calls 1

into_pyarrayMethod · 0.80

Tested by

no test coverage detected