Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup doc build warnings
  • Loading branch information
TomAugspurger committed Sep 9, 2024
commit 79bd32f55f96bf3203be6b836aa64e13c9279d2c
4 changes: 2 additions & 2 deletions src/zarr/core/buffer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def from_buffer(cls, buffer: Buffer) -> Self:
-------
A new buffer representing the content of the input buffer

Note
----
Notes
-----
Subclasses of `Buffer` must override this method to implement
more optimal conversions that avoid copies where possible
"""
Expand Down
4 changes: 2 additions & 2 deletions src/zarr/core/buffer/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def from_buffer(cls, buffer: core.Buffer) -> Self:
-------
A new buffer representing the content of the input buffer

Note
----
Notes
-----
Subclasses of `Buffer` must override this method to implement
more optimal conversions that avoid copies where possible
"""
Expand Down
12 changes: 6 additions & 6 deletions src/zarr/core/buffer/gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class Buffer(core.Buffer):
array-like instance can be copied/converted to a regular Numpy array
(host memory).

Note
----
Notes
-----
This buffer is untyped, so all indexing and sizes are in bytes.

Parameters
Expand Down Expand Up @@ -123,8 +123,8 @@ class NDBuffer(core.NDBuffer):
ndarray-like instance can be copied/converted to a regular Numpy array
(host memory).

Note
----
Notes
-----
The two buffer classes Buffer and NDBuffer are very similar. In fact, Buffer
is a special case of NDBuffer where dim=1, stride=1, and dtype="b". However,
in order to use Python's type system to differentiate between the contiguous
Expand Down Expand Up @@ -193,8 +193,8 @@ def from_numpy_array(cls, array_like: npt.ArrayLike) -> Self:
def as_numpy_array(self) -> npt.NDArray[Any]:
"""Returns the buffer as a NumPy array (host memory).

Warning
-------
Warnings
--------
Might have to copy data, consider using `.as_ndarray_like()` instead.

Returns
Expand Down