()
| 250 | |
| 251 | #[test] |
| 252 | fn to_pyarray_object_array() { |
| 253 | Python::attach(|py| { |
| 254 | let mut nd_arr = Array2::from_shape_fn((2, 3), |(_, _)| py.None()); |
| 255 | nd_arr[(0, 2)] = PyDict::new(py).into_any().unbind(); |
| 256 | nd_arr[(1, 0)] = PyString::new(py, "Hello:)").into_any().unbind(); |
| 257 | |
| 258 | let py_arr = nd_arr.to_pyarray(py); |
| 259 | |
| 260 | for (a, b) in nd_arr |
| 261 | .as_slice() |
| 262 | .unwrap() |
| 263 | .iter() |
| 264 | .zip(py_arr.readonly().as_slice().unwrap().iter()) |
| 265 | { |
| 266 | assert_eq!( |
| 267 | a.bind(py).compare(b).map_err(|e| e.print(py)).unwrap(), |
| 268 | Ordering::Equal |
| 269 | ); |
| 270 | } |
| 271 | }); |
| 272 | } |
| 273 | |
| 274 | #[test] |
| 275 | fn slice_container_type_confusion() { |
nothing calls this directly
no test coverage detected