(&self)
| 347 | } |
| 348 | |
| 349 | fn ndim(&self) -> usize { |
| 350 | let subarray = unsafe { PyDataType_SUBARRAY(self.py(), self.as_dtype_ptr()).as_ref() }; |
| 351 | match subarray { |
| 352 | None => 0, |
| 353 | Some(subarray) => unsafe { PyTuple_Size(subarray.shape) }.max(0) as _, |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | fn base(&self) -> Bound<'py, PyArrayDescr> { |
| 358 | let subarray = unsafe { PyDataType_SUBARRAY(self.py(), self.as_dtype_ptr()).as_ref() }; |
no test coverage detected