Skip to content

Commit b421075

Browse files
committed
Suggestions by Luke
1 parent 40e568c commit b421075

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/blosc2/lazyexpr.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ def compute(self, item: slice | list[slice] | None = None, **kwargs: Any) -> blo
337337
pass
338338

339339
@abstractmethod
340-
def __getitem__(self, item: int | slice | Sequence[slice]) -> blosc2.Array:
340+
def __getitem__(self, item: int | slice | Sequence[slice]) -> np.ndarray:
341341
"""
342-
Return a NumPy.ndarray containing the evaluation of the :ref:`LazyArray`.
342+
Return a numpy.ndarray containing the evaluation of the :ref:`LazyArray`.
343343
344344
Parameters
345345
----------
@@ -1152,7 +1152,7 @@ def fast_eval( # noqa: C901
11521152
operands: dict,
11531153
getitem: bool,
11541154
**kwargs,
1155-
) -> blosc2.Array:
1155+
) -> blosc2.NDArray | np.ndarray:
11561156
"""Evaluate the expression in chunks of operands using a fast path.
11571157
11581158
Parameters
@@ -1319,7 +1319,7 @@ def slices_eval( # noqa: C901
13191319
getitem: bool,
13201320
_slice=NDINDEX_EMPTY_TUPLE,
13211321
**kwargs,
1322-
) -> blosc2.Array:
1322+
) -> blosc2.NDArray | np.ndarray:
13231323
"""Evaluate the expression in chunks of operands.
13241324
13251325
This function can handle operands with different chunk shapes and
@@ -1722,7 +1722,7 @@ def reduce_slices( # noqa: C901
17221722
reduce_args,
17231723
_slice=NDINDEX_EMPTY_TUPLE,
17241724
**kwargs,
1725-
) -> blosc2.Array:
1725+
) -> blosc2.NDArray | np.ndarray:
17261726
"""Evaluate the expression in chunks of operands.
17271727
17281728
This function can handle operands with different chunk shapes.
@@ -2967,7 +2967,7 @@ def sort(self, order: str | list[str] | None = None) -> blosc2.LazyArray:
29672967
lazy_expr._order = order
29682968
return lazy_expr
29692969

2970-
def compute(self, item=(), **kwargs) -> blosc2.Array:
2970+
def compute(self, item=(), **kwargs) -> blosc2.NDArray:
29712971
# When NumPy ufuncs are called, the user may add an `out` parameter to kwargs
29722972
if "out" in kwargs:
29732973
kwargs["_output"] = kwargs.pop("out")
@@ -3250,7 +3250,7 @@ def info(self):
32503250
def info_items(self):
32513251
inputs = {}
32523252
for key, value in self.inputs_dict.items():
3253-
if isinstance(value, blosc2.Array | blosc2.C2Array):
3253+
if isinstance(value, blosc2.Array):
32543254
inputs[key] = f"<{value.__class__.__name__}> {value.shape} {value.dtype}"
32553255
else:
32563256
inputs[key] = str(value)

src/blosc2/ndarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def reshape(
406406

407407

408408
def _check_allowed_dtypes(
409-
value: bool | int | float | str | blosc2.Array | blosc2.Proxy | blosc2.LazyExpr,
409+
value: bool | int | float | str | blosc2.Array,
410410
):
411411
def _is_array_like(v: Any) -> bool:
412412
try:

0 commit comments

Comments
 (0)