@@ -1829,7 +1829,8 @@ def chunked_eval( # noqa: C901
1829
1829
operands: dict
1830
1830
A dictionary containing the operands for the expression.
1831
1831
item: int, slice or sequence of slices, optional
1832
- The slice(s) to be retrieved. Note that step parameter is not honored yet.
1832
+ The slice(s) of the operands to be used in computation. Note that step parameter is not honored yet.
1833
+ Item is used to slice the operands PRIOR to computation.
1833
1834
kwargs: Any, optional
1834
1835
Additional keyword arguments supported by the :func:`empty` constructor. In addition,
1835
1836
the following keyword arguments are supported:
@@ -2688,6 +2689,21 @@ def sort(self, order: str | list[str] | None = None) -> blosc2.LazyArray:
2688
2689
return lazy_expr
2689
2690
2690
2691
def compute (self , item = None , ** kwargs ) -> blosc2 .NDArray :
2692
+ """
2693
+ Compute the expression with the given item and kwargs.
2694
+ Parameters
2695
+ ----------
2696
+ item: int, slice or sequence of slices, optional
2697
+ The slice(s) of the operands to be used in computation. Note that step parameter is not honored yet.
2698
+ Item is used to slice the operands PRIOR to computation.
2699
+ kwargs
2700
+
2701
+ Returns:
2702
+ blosc2.NDArray or numpy.ndarray
2703
+ -------
2704
+
2705
+ """
2706
+
2691
2707
# When NumPy ufuncs are called, the user may add an `out` parameter to kwargs
2692
2708
if "out" in kwargs :
2693
2709
kwargs ["_output" ] = kwargs .pop ("out" )
@@ -2722,6 +2738,17 @@ def compute(self, item=None, **kwargs) -> blosc2.NDArray:
2722
2738
return result
2723
2739
2724
2740
def __getitem__ (self , item ):
2741
+ """
2742
+ Apply LazyExpr on a slice of the oeprands.
2743
+ Parameters
2744
+ ----------
2745
+ item: int, slice or sequence of slices, optional
2746
+ The slice(s) of the operands to be used in computation. Note that step parameter is not honored yet.
2747
+ Item is used to slice the operands PRIOR to computation.
2748
+ Returns:
2749
+ numpy.ndarray
2750
+ """
2751
+
2725
2752
kwargs = {"_getitem" : True }
2726
2753
return self .compute (item , ** kwargs )
2727
2754
0 commit comments