diff --git a/README.md b/README.md index 1d8f9ad..fb6c6fc 100644 --- a/README.md +++ b/README.md @@ -29,26 +29,33 @@ There are two ways to control the concurrency of the i/o **TODO: Need to clarify We **do not** officially support the following indexing methods. Some of these methods may error out, others may not: -1. Any `oindex` or `vindex` integer `np.ndarray` indexing with dimensionality >=3 i.e., -```python -arr[np.array([...]), :, np.array([...])] -arr[np.array([...]), np.array([...]), np.array([...])] -arr[np.array([...]), np.array([...]), np.array([...])] = ... -arr.oindex[np.array([...]), np.array([...]), np.array([...])] = ... -``` +1. Any `oindex` or `vindex` integer `np.ndarray` indexing with dimensionality >=3 i.e., + + ```python + arr[np.array([...]), :, np.array([...])] + arr[np.array([...]), np.array([...]), np.array([...])] + arr[np.array([...]), np.array([...]), np.array([...])] = ... + arr.oindex[np.array([...]), np.array([...]), np.array([...])] = ... + ``` + 2. Any `vindex` or `oindex` discontinuous integer `np.ndarray` indexing for writes in 2D -```python -arr[np.array([0, 5]), :] = ... -arr.oindex[np.array([0, 5]), :] = ... -``` -2. `vindex` writes in 2D where both indexers are integer `np.ndarray` indices i.e., -```python -arr[np.array([...]), np.array([...])] = ... -``` -3. Ellipsis indexing. We have tested some, but others fail even with `zarr-python`'s default codec pipeline. Thus for now we advise proceeding with caution here. -```python -arr[0:10, ..., 0:5] -``` + + ```python + arr[np.array([0, 5]), :] = ... + arr.oindex[np.array([0, 5]), :] = ... + ``` + +3. `vindex` writes in 2D where both indexers are integer `np.ndarray` indices i.e., + + ```python + arr[np.array([...]), np.array([...])] = ... + ``` + +4. Ellipsis indexing. We have tested some, but others fail even with `zarr-python`'s default codec pipeline. Thus for now we advise proceeding with caution here. + + ```python + arr[0:10, ..., 0:5] + ``` Otherwise, we believe that we support your indexing case: slices, ints, and all integer `np.ndarray` indices in 2D for reading, contiguous integer `np.ndarray` indices along one axis for writing etc. Please file an issue if you believe we have more holes in our coverage than we are aware of or you wish to contribute! For example, we have an [issue in zarrs for integer-array indexing](https://github.com/LDeakin/zarrs/issues/52) that would unblock a lot of these issues!