()
| 127 | |
| 128 | #[test] |
| 129 | fn into_pyarray_array() { |
| 130 | Python::attach(|py| { |
| 131 | let arr = Array3::<f64>::zeros((3, 4, 2)); |
| 132 | |
| 133 | let shape = arr.shape().to_vec(); |
| 134 | let strides = arr |
| 135 | .strides() |
| 136 | .iter() |
| 137 | .map(|dim| dim * size_of::<f64>() as isize) |
| 138 | .collect::<Vec<_>>(); |
| 139 | |
| 140 | let py_arr = arr.into_pyarray(py); |
| 141 | |
| 142 | assert_eq!(py_arr.shape(), shape.as_slice()); |
| 143 | assert_eq!(py_arr.strides(), strides.as_slice()); |
| 144 | }); |
| 145 | } |
| 146 | |
| 147 | #[test] |
| 148 | fn into_pyarray_cannot_resize() { |
nothing calls this directly
no test coverage detected