Skip to content

Commit eab6a1a

Browse files
authored
Merge branch 'main' into fast_zero_check
2 parents a04f31e + 8207dd3 commit eab6a1a

File tree

15 files changed

+33
-33
lines changed

15 files changed

+33
-33
lines changed

docs/user-guide/storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ print(store)
154154

155155
### Memory Store
156156

157-
The [`zarr.storage.MemoryStore`][] a in-memory store that allows for serialization of
157+
The [`zarr.storage.MemoryStore`][] an in-memory store that allows for serialization of
158158
Zarr data (metadata and chunks) to a dictionary:
159159

160160
```python exec="true" session="storage" source="above" result="ansi"

src/zarr/core/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@ async def _set_selection(
17231723
value = cast("NDArrayLike", value)
17241724

17251725
# We accept any ndarray like object from the user and convert it
1726-
# to a NDBuffer (or subclass). From this point onwards, we only pass
1726+
# to an NDBuffer (or subclass). From this point onwards, we only pass
17271727
# Buffer and NDBuffer between components.
17281728
value_buffer = prototype.nd_buffer.from_ndarray_like(value)
17291729

src/zarr/core/buffer/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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 an underlying ndarray-like instance that represents
318+
An 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
@@ -368,7 +368,7 @@ def create(
368368
369369
Notes
370370
-----
371-
A subclass can overwrite this method to create a ndarray-like object
371+
A subclass can overwrite this method to create an ndarray-like object
372372
other then the default Numpy array.
373373
"""
374374
if cls is NDBuffer:
@@ -416,7 +416,7 @@ def empty(
416416

417417
@classmethod
418418
def from_ndarray_like(cls, ndarray_like: NDArrayLike) -> Self:
419-
"""Create a new buffer of a ndarray-like object
419+
"""Create a new buffer of an ndarray-like object
420420
421421
Parameters
422422
----------
@@ -542,7 +542,7 @@ def all_equal(self, other: Any, equal_nan: bool = True) -> bool:
542542
# every single time we have to write data?
543543
_data, other = np.broadcast_arrays(self._data, other)
544544
return np.array_equal(
545-
self._data,
545+
_data,
546546
other,
547547
equal_nan=equal_nan
548548
if self._data.dtype.kind not in ("U", "S", "T", "O", "V")

src/zarr/core/buffer/cpu.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Buffer(core.Buffer):
2828
2929
We use Buffer throughout Zarr to represent a contiguous block of memory.
3030
31-
A Buffer is backed by a underlying array-like instance that represents
31+
A Buffer is backed by an underlying array-like instance that represents
3232
the memory. The memory type is unspecified; can be regular host memory,
3333
CUDA device memory, or something else. The only requirement is that the
3434
array-like instance can be copied/converted to a regular Numpy array
@@ -121,7 +121,7 @@ class NDBuffer(core.NDBuffer):
121121
122122
We use NDBuffer throughout Zarr to represent a n-dimensional memory block.
123123
124-
A NDBuffer is backed by a underlying ndarray-like instance that represents
124+
An NDBuffer is backed by an underlying ndarray-like instance that represents
125125
the memory. The memory type is unspecified; can be regular host memory,
126126
CUDA device memory, or something else. The only requirement is that the
127127
ndarray-like instance can be copied/converted to a regular Numpy array

src/zarr/core/buffer/gpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 an underlying ndarray-like instance that represents
126+
An 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/npy/bytes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ def to_json_scalar(self, data: object, *, zarr_format: ZarrFormat) -> str:
899899

900900
def from_json_scalar(self, data: JSON, *, zarr_format: ZarrFormat) -> np.void:
901901
"""
902-
Read a JSON-serializable value as a np.void.
902+
Read a JSON-serializable value as an np.void.
903903
904904
Parameters
905905
----------

src/zarr/core/dtype/npy/int.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ class Int8(BaseInt[np.dtypes.Int8DType, np.int8]):
263263
@classmethod
264264
def from_native_dtype(cls, dtype: TBaseDType) -> Self:
265265
"""
266-
Create an Int8 from a np.dtype('int8') instance.
266+
Create an Int8 from an np.dtype('int8') instance.
267267
268268
Parameters
269269
----------
@@ -288,7 +288,7 @@ def from_native_dtype(cls, dtype: TBaseDType) -> Self:
288288

289289
def to_native_dtype(self: Self) -> np.dtypes.Int8DType:
290290
"""
291-
Convert the Int8 instance to a np.dtype('int8') instance.
291+
Convert the Int8 instance to an np.dtype('int8') instance.
292292
293293
Returns
294294
-------
@@ -419,7 +419,7 @@ class UInt8(BaseInt[np.dtypes.UInt8DType, np.uint8]):
419419
@classmethod
420420
def from_native_dtype(cls, dtype: TBaseDType) -> Self:
421421
"""
422-
Create a UInt8 from a np.dtype('uint8') instance.
422+
Create a UInt8 from an np.dtype('uint8') instance.
423423
"""
424424
if cls._check_native_dtype(dtype):
425425
return cls()
@@ -566,7 +566,7 @@ class Int16(BaseInt[np.dtypes.Int16DType, np.int16], HasEndianness):
566566
@classmethod
567567
def from_native_dtype(cls, dtype: TBaseDType) -> Self:
568568
"""
569-
Create an instance of this data type from a np.dtype('int16') instance.
569+
Create an instance of this data type from an np.dtype('int16') instance.
570570
571571
Parameters
572572
----------
@@ -591,7 +591,7 @@ def from_native_dtype(cls, dtype: TBaseDType) -> Self:
591591

592592
def to_native_dtype(self) -> np.dtypes.Int16DType:
593593
"""
594-
Convert the data type to a np.dtype('int16') instance.
594+
Convert the data type to an np.dtype('int16') instance.
595595
596596
Returns
597597
-------
@@ -728,7 +728,7 @@ class UInt16(BaseInt[np.dtypes.UInt16DType, np.uint16], HasEndianness):
728728
@classmethod
729729
def from_native_dtype(cls, dtype: TBaseDType) -> Self:
730730
"""
731-
Create an instance of this data type from a np.dtype('uint16') instance.
731+
Create an instance of this data type from an np.dtype('uint16') instance.
732732
733733
Parameters
734734
----------
@@ -753,7 +753,7 @@ def from_native_dtype(cls, dtype: TBaseDType) -> Self:
753753

754754
def to_native_dtype(self) -> np.dtypes.UInt16DType:
755755
"""
756-
Convert the data type to a np.dtype('uint16') instance.
756+
Convert the data type to an np.dtype('uint16') instance.
757757
758758
Returns
759759
-------
@@ -911,7 +911,7 @@ def _check_native_dtype(cls: type[Self], dtype: TBaseDType) -> TypeGuard[np.dtyp
911911
@classmethod
912912
def from_native_dtype(cls: type[Self], dtype: TBaseDType) -> Self:
913913
"""
914-
Create an Int32 from a np.dtype('int32') instance.
914+
Create an Int32 from an np.dtype('int32') instance.
915915
916916
Parameters
917917
----------
@@ -936,7 +936,7 @@ def from_native_dtype(cls: type[Self], dtype: TBaseDType) -> Self:
936936

937937
def to_native_dtype(self: Self) -> np.dtypes.Int32DType:
938938
"""
939-
Convert the Int32 instance to a np.dtype('int32') instance.
939+
Convert the Int32 instance to an np.dtype('int32') instance.
940940
941941
Returns
942942
-------
@@ -1073,7 +1073,7 @@ class UInt32(BaseInt[np.dtypes.UInt32DType, np.uint32], HasEndianness):
10731073
@classmethod
10741074
def from_native_dtype(cls, dtype: TBaseDType) -> Self:
10751075
"""
1076-
Create a UInt32 from a np.dtype('uint32') instance.
1076+
Create a UInt32 from an np.dtype('uint32') instance.
10771077
10781078
Parameters
10791079
----------
@@ -1231,7 +1231,7 @@ class Int64(BaseInt[np.dtypes.Int64DType, np.int64], HasEndianness):
12311231
@classmethod
12321232
def from_native_dtype(cls, dtype: TBaseDType) -> Self:
12331233
"""
1234-
Create an Int64 from a np.dtype('int64') instance.
1234+
Create an Int64 from an np.dtype('int64') instance.
12351235
12361236
Parameters
12371237
----------

src/zarr/core/metadata/v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def parse_dimension_names(data: object) -> tuple[str | None, ...] | None:
117117
elif isinstance(data, Iterable) and all(isinstance(x, type(None) | str) for x in data):
118118
return tuple(data)
119119
else:
120-
msg = f"Expected either None or a iterable of str, got {type(data)}"
120+
msg = f"Expected either None or an iterable of str, got {type(data)}"
121121
raise TypeError(msg)
122122

123123

src/zarr/storage/_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ async def make_store(
311311
):
312312
raise TypeError(
313313
"'storage_options' was provided but unused. "
314-
"'storage_options' is only used when the store is passed as a FSSpec URI string.",
314+
"'storage_options' is only used when the store is passed as an FSSpec URI string.",
315315
)
316316

317317
assert mode in (None, "r", "r+", "a", "w", "w-")
@@ -341,7 +341,7 @@ async def make_store(
341341
return await LocalStore.open(root=store_like, mode=mode, read_only=_read_only)
342342

343343
elif isinstance(store_like, str):
344-
# Either a FSSpec URI or a local filesystem path
344+
# Either an FSSpec URI or a local filesystem path
345345
if _is_fsspec_uri(store_like):
346346
return FsspecStore.from_url(
347347
store_like, storage_options=storage_options, read_only=_read_only
@@ -409,7 +409,7 @@ async def make_store_path(
409409
if storage_options:
410410
raise TypeError(
411411
"'storage_options' was provided but unused. "
412-
"'storage_options' is only used when the store is passed as a FSSpec URI string.",
412+
"'storage_options' is only used when the store is passed as an FSSpec URI string.",
413413
)
414414
return store_like / path_normalized
415415

src/zarr/storage/_fsspec.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def from_upath(
147147
allowed_exceptions: tuple[type[Exception], ...] = ALLOWED_EXCEPTIONS,
148148
) -> FsspecStore:
149149
"""
150-
Create a FsspecStore from an upath object.
150+
Create an FsspecStore from a upath object.
151151
152152
Parameters
153153
----------
@@ -178,7 +178,7 @@ def from_mapper(
178178
allowed_exceptions: tuple[type[Exception], ...] = ALLOWED_EXCEPTIONS,
179179
) -> FsspecStore:
180180
"""
181-
Create a FsspecStore from a FSMap object.
181+
Create an FsspecStore from an FSMap object.
182182
183183
Parameters
184184
----------
@@ -211,7 +211,7 @@ def from_url(
211211
allowed_exceptions: tuple[type[Exception], ...] = ALLOWED_EXCEPTIONS,
212212
) -> FsspecStore:
213213
"""
214-
Create a FsspecStore from a URL. The type of store is determined from the URL scheme.
214+
Create an FsspecStore from a URL. The type of store is determined from the URL scheme.
215215
216216
Parameters
217217
----------

0 commit comments

Comments
 (0)