Skip to content

Commit 193dc76

Browse files
committed
Add a note on how to build persisted sorted arrays
1 parent c589b27 commit 193dc76

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/blosc2/ndarray.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6778,6 +6778,12 @@ def sort(array: blosc2.Array, order: str | list[str] | None = None, **kwargs: An
67786778
rows are gathered directly in ascending stable index order. Secondary keys
67796779
refine ties after the primary indexed order. Field-based orders without a
67806780
matching full index fall back to a scan-plus-sort path.
6781+
6782+
Sorting never mutates the input array in place. The result is always a new
6783+
array materialization. For persistent inputs, the sorted rows are returned
6784+
as a new in-memory :ref:`NDArray` by default; pass storage kwargs such as
6785+
``urlpath`` (and typically ``mode="w"``) if the sorted output should also
6786+
be persisted on disk.
67816787
"""
67826788
if not order:
67836789
return array

0 commit comments

Comments
 (0)