Skip to content

Commit 7d0b62d

Browse files
authored
DOC: Correct typos in zarr-python documentation (#3579)
1 parent d0c3b7f commit 7d0b62d

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

docs/user-guide/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ If an array or group is backed by a persistent store such as the a `zarr.storage
265265
**are not** pickled. The only thing that is pickled is the necessary parameters to allow the store
266266
to re-open any underlying files or databases upon being unpickled.
267267

268-
E.g., pickle/unpickle an local store array:
268+
E.g., pickle/unpickle a local store array:
269269

270270
```python exec="true" session="performance" source="above" result="ansi"
271271
import pickle

src/zarr/core/buffer/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Buffer(ABC):
125125
126126
We use Buffer throughout Zarr to represent a contiguous block of memory.
127127
128-
A Buffer is backed by a underlying array-like instance that represents
128+
A Buffer is backed by an underlying array-like instance that represents
129129
the memory. The memory type is unspecified; can be regular host memory,
130130
CUDA device memory, or something else. The only requirement is that the
131131
array-like instance can be copied/converted to a regular Numpy array
@@ -315,7 +315,7 @@ class NDBuffer:
315315
316316
We use NDBuffer throughout Zarr to represent a n-dimensional memory block.
317317
318-
A NDBuffer is backed by a underlying ndarray-like instance that represents
318+
A NDBuffer is backed by an underlying ndarray-like instance that represents
319319
the memory. The memory type is unspecified; can be regular host memory,
320320
CUDA device memory, or something else. The only requirement is that the
321321
ndarray-like instance can be copied/converted to a regular Numpy array

src/zarr/core/buffer/gpu.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Buffer(core.Buffer):
3636
3737
We use Buffer throughout Zarr to represent a contiguous block of memory.
3838
39-
A Buffer is backed by a underlying array-like instance that represents
39+
A Buffer is backed by an underlying array-like instance that represents
4040
the memory. The memory type is unspecified; can be regular host memory,
4141
CUDA device memory, or something else. The only requirement is that the
4242
array-like instance can be copied/converted to a regular Numpy array
@@ -90,7 +90,7 @@ def create_zero_length(cls) -> Self:
9090

9191
@classmethod
9292
def from_buffer(cls, buffer: core.Buffer) -> Self:
93-
"""Create an GPU Buffer given an arbitrary Buffer
93+
"""Create a GPU Buffer given an arbitrary Buffer
9494
This will try to be zero-copy if `buffer` is already on the
9595
GPU and will trigger a copy if not.
9696
@@ -123,7 +123,7 @@ class NDBuffer(core.NDBuffer):
123123
124124
We use NDBuffer throughout Zarr to represent a n-dimensional memory block.
125125
126-
A NDBuffer is backed by a underlying ndarray-like instance that represents
126+
A NDBuffer is backed by an underlying ndarray-like instance that represents
127127
the memory. The memory type is unspecified; can be regular host memory,
128128
CUDA device memory, or something else. The only requirement is that the
129129
ndarray-like instance can be copied/converted to a regular Numpy array

src/zarr/core/dtype/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def check_structured_dtype_name_v2(data: Sequence[object]) -> TypeGuard[Structur
9898

9999
def check_dtype_name_v2(data: object) -> TypeGuard[DTypeName_V2]:
100100
"""
101-
Type guard for narrowing the type of a python object to an valid zarr v2 dtype name.
101+
Type guard for narrowing the type of a python object to a valid zarr v2 dtype name.
102102
"""
103103
if isinstance(data, str):
104104
return True

src/zarr/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class MetadataValidationError(BaseZarrError):
9191

9292
class UnknownCodecError(BaseZarrError):
9393
"""
94-
Raised when a unknown codec was used.
94+
Raised when an unknown codec was used.
9595
"""
9696

9797

src/zarr/registry.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ def _parse_array_bytes_codec(data: dict[str, JSON] | Codec) -> ArrayBytesCodec:
227227
if isinstance(data, dict):
228228
result = _resolve_codec(data)
229229
if not isinstance(result, ArrayBytesCodec):
230-
msg = f"Expected a dict representation of a ArrayBytesCodec; got a dict representation of a {type(result)} instead."
230+
msg = f"Expected a dict representation of an ArrayBytesCodec; got a dict representation of a {type(result)} instead."
231231
raise TypeError(msg)
232232
else:
233233
if not isinstance(data, ArrayBytesCodec):
234-
raise TypeError(f"Expected a ArrayBytesCodec. Got {type(data)} instead.")
234+
raise TypeError(f"Expected an ArrayBytesCodec. Got {type(data)} instead.")
235235
result = data
236236
return result
237237

@@ -247,11 +247,11 @@ def _parse_array_array_codec(data: dict[str, JSON] | Codec) -> ArrayArrayCodec:
247247
if isinstance(data, dict):
248248
result = _resolve_codec(data)
249249
if not isinstance(result, ArrayArrayCodec):
250-
msg = f"Expected a dict representation of a ArrayArrayCodec; got a dict representation of a {type(result)} instead."
250+
msg = f"Expected a dict representation of an ArrayArrayCodec; got a dict representation of a {type(result)} instead."
251251
raise TypeError(msg)
252252
else:
253253
if not isinstance(data, ArrayArrayCodec):
254-
raise TypeError(f"Expected a ArrayArrayCodec. Got {type(data)} instead.")
254+
raise TypeError(f"Expected an ArrayArrayCodec. Got {type(data)} instead.")
255255
result = data
256256
return result
257257

src/zarr/testing/buffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def create(
4545
order: Literal["C", "F"] = "C",
4646
fill_value: Any | None = None,
4747
) -> Self:
48-
"""Overwrite `NDBuffer.create` to create an TestNDArrayLike instance"""
48+
"""Overwrite `NDBuffer.create` to create a TestNDArrayLike instance"""
4949
ret = cls(TestNDArrayLike(shape=shape, dtype=dtype, order=order))
5050
if fill_value is not None:
5151
ret.fill(fill_value)

src/zarr/testing/strategies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def orthogonal_indices(
377377
"""
378378
Strategy that returns
379379
(1) a tuple of integer arrays used for orthogonal indexing of Zarr arrays.
380-
(2) an tuple of integer arrays that can be used for equivalent indexing of numpy arrays
380+
(2) a tuple of integer arrays that can be used for equivalent indexing of numpy arrays
381381
"""
382382
zindexer = []
383383
npindexer = []

0 commit comments

Comments
 (0)