Skip to content

Commit 6f67aa2

Browse files
committed
Add small description for main classes
1 parent 9f8ee52 commit 6f67aa2

6 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/blosc2/c2array.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ def slice_to_string(slice_):
182182

183183

184184
class C2Array(blosc2.Operand):
185+
"""Remote compressed NDArray accessed from a Caterva2 server."""
186+
185187
def __init__(self, path: str, /, urlbase: str | None = None, auth_token: str | None = None):
186188
"""Create an instance of a remote NDArray.
187189

src/blosc2/ctable.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,8 @@ def as_dict(self) -> dict[str, Any]:
510510

511511

512512
class Column:
513+
"""Column view for a :class:`CTable`, with vectorized operations and reductions."""
514+
513515
_REPR_PREVIEW_ITEMS = 8
514516

515517
def __init__(self, table: CTable, col_name: str, mask=None):
@@ -1432,6 +1434,8 @@ def _fmt_bytes(n: int) -> str:
14321434

14331435

14341436
class CTable(Generic[RowT]):
1437+
"""Columnar compressed table with typed columns and row-oriented access."""
1438+
14351439
#: Ordered list of stored column names. Computed columns are **not**
14361440
#: included; access those via :attr:`computed_columns`.
14371441
col_names: list[str]

src/blosc2/dict_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
class DictStore:
2929
"""
30-
Directory-based storage for compressed data using Blosc2.
30+
Dictionary-like storage for compressed Blosc2 objects.
3131
3232
Manages arrays in a directory or zip-file backed format.
3333

src/blosc2/lazyexpr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ def __str__(self):
368368

369369

370370
class LazyArray(ABC, blosc2.Operand):
371+
"""Base class for lazy array expressions that compute data on demand."""
372+
371373
def _get_user_vlmeta(self) -> dict[str, Any]:
372374
if not hasattr(self, "_vlmeta_user"):
373375
self._vlmeta_user = {}

src/blosc2/ndarray.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3746,6 +3746,8 @@ def __next__(self):
37463746

37473747

37483748
class NDArray(blosc2_ext.NDArray, Operand):
3749+
"""Compressed, chunked N-dimensional array with NumPy-like indexing."""
3750+
37493751
def __init__(self, **kwargs):
37503752
self._schunk = SChunk(_schunk=kwargs["_schunk"], _is_view=True) # SChunk Python instance
37513753
self._keep_last_read = False
@@ -6813,6 +6815,8 @@ def iter_sorted(
68136815
# Class for dealing with fields in an NDArray
68146816
# This will allow to access fields by name in the dtype of the NDArray
68156817
class NDField(Operand):
6818+
"""View of one field from an :class:`NDArray` with a structured dtype."""
6819+
68166820
def __init__(self, ndarr: NDArray, field: str):
68176821
"""
68186822
Create a new NDField.

src/blosc2/schunk.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ def __str__(self):
191191

192192

193193
class SChunk(blosc2_ext.SChunk):
194+
"""Compressed super-chunk storing a sequence of compressed chunks."""
195+
194196
def __init__( # noqa: C901
195197
self,
196198
chunksize: int | None = None,

0 commit comments

Comments
 (0)