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

Function to_pyarray_boxed_slice

tests/to_py.rs:24–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23#[test]
24fn to_pyarray_boxed_slice() {
25 Python::attach(|py| {
26 let arr = vec![1, 2, 3].into_boxed_slice().to_pyarray(py);
27
28 assert_eq!(arr.shape(), [3]);
29 assert_eq!(arr.readonly().as_slice().unwrap(), &[1, 2, 3])
30 });
31}
32
33#[test]
34fn to_pyarray_array() {

Callers

nothing calls this directly

Calls 1

to_pyarrayMethod · 0.80

Tested by

no test coverage detected