(py: Python<'_>)
| 33 | } |
| 34 | |
| 35 | fn not_aligned_array(py: Python<'_>) -> Bound<'_, PyArray1<u16>> { |
| 36 | py.eval( |
| 37 | c_str!("np.zeros(8, dtype='u2').view('u1')[1:-1].view('u2')"), |
| 38 | None, |
| 39 | Some(&get_np_locals(py)), |
| 40 | ) |
| 41 | .unwrap() |
| 42 | .cast_into() |
| 43 | .unwrap() |
| 44 | } |
| 45 | |
| 46 | #[test] |
| 47 | fn new_c_order() { |