Skip to content

Commit d50ded4

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions-4d91c028e1
2 parents 7b1bc21 + 84532ca commit d50ded4

26 files changed

Lines changed: 735 additions & 286 deletions

changes/3899.bugfix.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Make chunk normalization properly handle `-1` as a compact representation of the
2+
length of an entire axis. Reject several previously-accepted but ill-defined
3+
chunk specifications: `chunks=True` (previously silently produced size-1 chunks),
4+
chunk tuples shorter than the array's number of dimensions (previously padded to
5+
the array's shape), and `None` as a per-dimension chunk size. These all now
6+
raise informative errors. Also fix chunk handling for 0-length array dimensions,
7+
and add explicit rejection of 0-length chunks.

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ print("Hello world")
255255

256256
#### Building documentation without executing code blocks
257257

258-
Sometimes, you may want the documentation to build quicker. You can disable code block execution by commenting out the [markdown-exec](https://github.com/zarr-developers/zarr-python/blob/884a8c91afcc3efe28b3da952be3b85125c453cb/mkdocs.yml#L132 plugin in the mkdocs configuration file). This will make code blocks and cross references render incorrectly (i.e., expect build warnings), but also reduces build time by ~3x. Be sure to undo the commenting out before opening your pull request.
258+
Sometimes, you may want the documentation to build quicker. You can disable code block execution by commenting out the [markdown-exec plugin](https://github.com/zarr-developers/zarr-python/blob/884a8c91afcc3efe28b3da952be3b85125c453cb/mkdocs.yml#L132) in the mkdocs configuration file. This will make code blocks and cross references render incorrectly (i.e., expect build warnings), but also reduces build time by ~3x. Be sure to undo the commenting out before opening your pull request.
259259

260260
### Changelog
261261

docs/user-guide/arrays.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ print(np.all(z.oindex[[0, 2], :] == z[[0, 2], :]))
512512

513513
### Block Indexing
514514

515-
Zarr also support block indexing, which allows selections of whole chunks based on their
515+
Zarr also supports block indexing, which allows selections of whole chunks based on their
516516
logical indices along each dimension of an array. For example, this allows selecting
517517
a subset of chunk aligned rows and/or columns from a 2-dimensional array. E.g.:
518518

docs/user-guide/consolidated_metadata.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If consolidated metadata is present in a Zarr Group's metadata then it is used
1717
by default. The initial read to open the group will need to communicate with
1818
the store (reading from a file for a [`zarr.storage.LocalStore`][], making a
1919
network request for a [`zarr.storage.FsspecStore`][]). After that, any subsequent
20-
metadata reads get child Group or Array nodes will *not* require reads from the store.
20+
metadata reads to get child Group or Array nodes will *not* require reads from the store.
2121

2222
In Python, the consolidated metadata is available on the `.consolidated_metadata`
2323
attribute of the `GroupMetadata` object.
@@ -49,7 +49,7 @@ print(result)
4949
```
5050

5151
If we open that group, the Group's metadata has a `zarr.core.group.ConsolidatedMetadata`
52-
that can be used.:
52+
that can be used:
5353

5454
```python exec="true" session="consolidated_metadata" source="above" result="ansi"
5555
from pprint import pprint
@@ -58,19 +58,19 @@ import io
5858
consolidated = zarr.open_group(store="memory://consolidated-metadata-demo")
5959
consolidated_metadata = consolidated.metadata.consolidated_metadata.metadata
6060

61-
# Note: pprint can be users without capturing the output regularly
61+
# Note: pprint can be used without capturing the output regularly
6262
output = io.StringIO()
6363
pprint(dict(sorted(consolidated_metadata.items())), stream=output, width=60)
6464
print(output.getvalue())
6565
```
6666

67-
Operations on the group to get children automatically use the consolidated metadata.:
67+
Operations on the group to get children automatically use the consolidated metadata:
6868

6969
```python exec="true" session="consolidated_metadata" source="above" result="ansi"
7070
print(consolidated['a']) # no read / HTTP request to the Store is required
7171
```
7272

73-
With nested groups, the consolidated metadata is available on the children, recursively.:
73+
With nested groups, the consolidated metadata is available on the children, recursively:
7474

7575
```python exec="true" session="consolidated_metadata" source="above" result="ansi"
7676
child = group.create_group('child', attributes={'kind': 'child'})

docs/user-guide/data_types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ here, it's possible to create it yourself: see [Adding New Data Types](#adding-n
262262

263263
### Example Usage
264264

265-
This section will demonstrates the basic usage of Zarr data types.
265+
This section will demonstrate the basic usage of Zarr data types.
266266

267267
Create a `ZDType` from a native data type:
268268

docs/user-guide/experimental.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This section contains documentation for experimental Zarr Python features. The f
44

55
## `CacheStore`
66

7-
Zarr Python 3.1.4 adds [`zarr.experimental.cache_store.CacheStore`][] provides a dual-store caching implementation
7+
Zarr Python 3.1.4 adds [`zarr.experimental.cache_store.CacheStore`][], which provides a dual-store caching implementation
88
that can be wrapped around any Zarr store to improve performance for repeated data access.
99
This is particularly useful when working with remote stores (e.g., S3, HTTP) where network
1010
latency can significantly impact data access speed.

docs/user-guide/extending.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ Coming soon.
7878

7979
## Custom array buffers
8080

81-
Zarr-python provides control over where and how arrays stored in memory through
81+
Zarr-python provides control over where and how arrays are stored in memory through
8282
[`zarr.abc.buffer.Buffer`][]. Currently both CPU (the default) and GPU implementations are
8383
provided (see [Using GPUs with Zarr](gpu.md) for more information). You can implement your own buffer
8484
classes by implementing the interface defined in [`zarr.abc.buffer.BufferPrototype`][].
8585

8686
## Other extensions
8787

88-
In the future, Zarr will support writing custom custom data types and chunk grids.
88+
In the future, Zarr will support writing custom data types and chunk grids.

docs/user-guide/gpu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Zarr can use GPUs to accelerate your workload by running `zarr.Config.enable_gpu
77
memory as the final stage of the codec pipeline. Data will still be read into
88
or copied to host (CPU) memory for encoding and decoding.
99

10-
In the future, codecs will be available compressing and decompressing data on
10+
In the future, codecs will be available for compressing and decompressing data on
1111
the GPU, avoiding the need to move data between the host and device for
1212
compression and decompression.
1313

docs/user-guide/groups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ For more information on groups see the [`zarr.Group` API docs](../api/zarr/group
6969
## Batch Group Creation
7070

7171
You can also create multiple groups concurrently with a single function call. [`zarr.create_hierarchy`][] takes
72-
a [`zarr Storage instance`](../api/zarr/storage.md) instance and a dict of `key : metadata` pairs, parses that dict, and
72+
a [`zarr Storage`](../api/zarr/storage.md) instance and a dict of `key : metadata` pairs, parses that dict, and
7373
writes metadata documents to storage:
7474

7575
```python exec="true" session="groups" source="above" result="ansi"

docs/user-guide/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Zarr arrays and groups can be pickled, as long as the underlying store object ca
296296
pickled. With the exception of the `zarr.storage.MemoryStore`, any of the
297297
storage classes provided in the `zarr.storage` module can be pickled.
298298

299-
If an array or group is backed by a persistent store such as the a `zarr.storage.LocalStore`,
299+
If an array or group is backed by a persistent store such as a `zarr.storage.LocalStore`,
300300
`zarr.storage.ZipStore` or `zarr.storage.FsspecStore` then the store data
301301
**are not** pickled. The only thing that is pickled is the necessary parameters to allow the store
302302
to re-open any underlying files or databases upon being unpickled.

0 commit comments

Comments
 (0)