Skip to content

Commit

Permalink
Fix enumeration in readme (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Nov 18, 2024
1 parent a36e087 commit a463fdf
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down

0 comments on commit a463fdf

Please sign in to comment.