()
| 724 | |
| 725 | #[test] |
| 726 | fn array_with_zero_dimensions() { |
| 727 | Python::attach(|py| { |
| 728 | let array = PyArray::<f64, _>::zeros(py, (1, 0, 3), false); |
| 729 | |
| 730 | let base = unsafe { (*array.as_array_ptr()).base }; |
| 731 | assert!(base.is_null()); |
| 732 | |
| 733 | let base_address = base_address(py, array.as_array_ptr()); |
| 734 | assert_eq!(base_address, array.as_ptr().cast::<c_void>()); |
| 735 | |
| 736 | let data_range = data_range(py, array.as_array_ptr()); |
| 737 | assert_eq!(data_range.0, array.data() as *mut c_char); |
| 738 | assert_eq!(data_range.1, array.data() as *mut c_char); |
| 739 | }); |
| 740 | } |
| 741 | |
| 742 | #[test] |
| 743 | fn view_with_non_dividing_strides() { |
nothing calls this directly
no test coverage detected