Skip to content

Commit

Permalink
Add some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
martaiborra committed Sep 13, 2024
1 parent 8d2f4cc commit 5428211
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/blosc2/ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,12 +883,12 @@ def blocksize(self):
"""
return self._schunk.blocksize

def __getitem__(self, key: int | slice | Sequence[slice] | blosc2.LazyExpr) -> np.ndarray | blosc2.LazyExpr:
def __getitem__(self, key: int | slice | Sequence[slice] | blosc2.LazyExpr | str) -> np.ndarray | blosc2.LazyExpr:
"""Get a (multidimensional) slice as specified in key.
Parameters
----------
key: int, slice, sequence of slices or LazyExpr
key: int, slice, sequence of slices, LazyExpr or str
The slice(s) to be retrieved. Note that step parameter is not honored yet
in slices. If a LazyExpr is provided, the expression is supposed to be of boolean
type and the result will be the values of this array where the expression is True.
Expand Down Expand Up @@ -1144,7 +1144,7 @@ def to_cframe(self) -> bytes:
"""
return super().to_cframe()

def copy(self, dtype: np.dtype = None, **kwargs: dict):
def copy(self, dtype: np.dtype = None, **kwargs: dict) -> NDArray:
"""Create a copy of an array with same parameters.
Parameters
Expand Down Expand Up @@ -1376,7 +1376,7 @@ def tan(ndarr: NDArray | NDField | blosc2.C2Array | blosc2.LazyExpr, /) -> blosc
Parameters
----------
ndarr: :ref:`NDArray` or :ref:`NDField` or :ref:`C2Array` or :ref:`LazyExpr`
Angle, in radians.
Angle, in radians.
Returns
-------
Expand Down Expand Up @@ -1411,7 +1411,7 @@ def sqrt(ndarr: NDArray | NDField | blosc2.C2Array | blosc2.LazyExpr, /) -> blos
Parameters
----------
ndarr: :ref:`NDArray` or :ref:`NDField` or :ref:`C2Array` or :ref:`LazyExpr`
The input array.
The input array.
Returns
-------
Expand Down Expand Up @@ -1445,7 +1445,7 @@ def sinh(ndarr: NDArray | NDField | blosc2.C2Array | blosc2.LazyExpr, /) -> blos
Parameters
----------
ndarr: :ref:`NDArray` or :ref:`NDField` or :ref:`C2Array` or :ref:`LazyExpr`
The input array.
The input array.
Returns
-------
Expand Down Expand Up @@ -1513,7 +1513,7 @@ def tanh(ndarr: NDArray | NDField | blosc2.C2Array | blosc2.LazyExpr, /) -> blos
Parameters
----------
ndarr: :ref:`NDArray` or :ref:`NDField` or :ref:`C2Array` or :ref:`LazyExpr`
The input array.
The input array.
Returns
-------
Expand Down Expand Up @@ -2001,7 +2001,7 @@ def real(ndarr: NDArray | NDField | blosc2.C2Array | blosc2.LazyExpr, /) -> blos
Returns
-------
out: :ref:`LazyExpr`
A lazy expression that can be evaluated.
A lazy expression that can be evaluated.
References
----------
Expand Down

0 comments on commit 5428211

Please sign in to comment.