|
19 | 19 | if TYPE_CHECKING: |
20 | 20 | from xarray.namedarray._typing import ( |
21 | 21 | _Chunks, |
| 22 | + _DType, |
| 23 | + _DTypeLike, |
22 | 24 | _NormalizedChunks, |
| 25 | + _ShapeType, |
23 | 26 | duckarray, |
24 | 27 | ) |
25 | 28 |
|
@@ -220,9 +223,9 @@ def chunks(self, data: T_ChunkedArray) -> _NormalizedChunks: |
220 | 223 | def normalize_chunks( |
221 | 224 | self, |
222 | 225 | chunks: _Chunks | _NormalizedChunks, |
223 | | - shape: tuple[int, ...] | None = None, |
| 226 | + shape: _ShapeType | None = None, |
224 | 227 | limit: int | None = None, |
225 | | - dtype: np.dtype | None = None, |
| 228 | + dtype: _DType | None = None, |
226 | 229 | previous_chunks: _NormalizedChunks | None = None, |
227 | 230 | ) -> _NormalizedChunks: |
228 | 231 | """ |
@@ -359,7 +362,7 @@ def reduction( |
359 | 362 | combine_func: Callable | None = None, |
360 | 363 | aggregate_func: Callable | None = None, |
361 | 364 | axis: int | Sequence[int] | None = None, |
362 | | - dtype: np.dtype | None = None, |
| 365 | + dtype: _DTypeLike | None = None, |
363 | 366 | keepdims: bool = False, |
364 | 367 | ) -> T_ChunkedArray: |
365 | 368 | """ |
@@ -409,7 +412,7 @@ def apply_gufunc( |
409 | 412 | *args: Any, |
410 | 413 | axes: Sequence[tuple[int, ...]] | None = None, |
411 | 414 | keepdims: bool = False, |
412 | | - output_dtypes: Sequence[np.typing.DTypeLike] | None = None, |
| 415 | + output_dtypes: Sequence[_DTypeLike] | None = None, |
413 | 416 | vectorize: bool | None = None, |
414 | 417 | **kwargs, |
415 | 418 | ): |
@@ -492,7 +495,7 @@ def map_blocks( |
492 | 495 | self, |
493 | 496 | func: Callable, |
494 | 497 | *args: Any, |
495 | | - dtype: np.typing.DTypeLike | None = None, |
| 498 | + dtype: _DTypeLike | None = None, |
496 | 499 | chunks: tuple[int, ...] | None = None, |
497 | 500 | drop_axis: int | Sequence[int] | None = None, |
498 | 501 | new_axis: int | Sequence[int] | None = None, |
|
0 commit comments