(self)
| 371 | assert named_array.dims == tuple(new_dims) |
| 372 | |
| 373 | def test_duck_array_class(self) -> None: |
| 374 | numpy_a: NDArray[np.int64] |
| 375 | numpy_a = np.array([2.1, 4], dtype=np.dtype(np.int64)) |
| 376 | check_duck_array_typevar(numpy_a) |
| 377 | |
| 378 | masked_a: np.ma.MaskedArray[Any, np.dtype[np.int64]] |
| 379 | masked_a = np.ma.asarray([2.1, 4], dtype=np.dtype(np.int64)) |
| 380 | check_duck_array_typevar(masked_a) |
| 381 | |
| 382 | custom_a: CustomArrayIndexable[Any, np.dtype[np.int64]] |
| 383 | custom_a = CustomArrayIndexable(numpy_a) |
| 384 | check_duck_array_typevar(custom_a) |
| 385 | |
| 386 | def test_duck_array_class_array_api(self) -> None: |
| 387 | # Test numpy's array api: |
nothing calls this directly
no test coverage detected