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

Function into_pyarray_can_write

tests/to_py.rs:159–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157
158#[test]
159fn into_pyarray_can_write() {
160 Python::attach(|py| {
161 let arr = vec![1, 2, 3].into_pyarray(py);
162
163 py_run!(py, arr, "assert arr.flags['WRITEABLE']");
164 py_run!(py, arr, "arr[1] = 4");
165 });
166}
167
168#[test]
169fn collapsed_into_pyarray() {

Callers

nothing calls this directly

Calls 1

into_pyarrayMethod · 0.80

Tested by

no test coverage detected