Skip to content

Commit d30b2f2

Browse files
committed
last docs
1 parent 38f9d22 commit d30b2f2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/fast_array_utils/_plugins/numba_sparse.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
from fast_array_utils.types import CSBase
4343

4444

45-
# define numba base type representing compressed sparse matrix classes
4645
class CSType(nbtypes.Type):
4746
"""A Numba `Type` modeled after the base class `scipy.sparse.compressed._cs_matrix`.
4847
4948
This is an abstract base class for the actually used, registered types in `TYPES` below.
49+
It collects information about the type (e.g. field dtypes) for later use in the data model.
5050
"""
5151

5252
name: ClassVar[Literal["csr_matrix", "csc_matrix", "csr_array", "csc_array"]]
@@ -96,12 +96,12 @@ def typeof(val: CSBase, c: _TypeofContext) -> CSType:
9696

9797

9898
if TYPE_CHECKING:
99-
_Base = models.StructModel[CSType]
99+
_CSModelBase = models.StructModel[CSType]
100100
else:
101-
_Base = models.StructModel
101+
_CSModelBase = models.StructModel
102102

103103

104-
class CSModel(_Base):
104+
class CSModel(_CSModelBase):
105105
"""Numba data model for compressed sparse matrices.
106106
107107
This is the class that is used by numba to lower the array types.
@@ -261,6 +261,7 @@ def copy(inst: CSType) -> CSType: # pragma: no cover
261261

262262

263263
def register() -> None:
264+
"""Register the numba types, data models, and mappings between them and the Python types."""
264265
for cls, func in TYPEOF_FUNCS.items():
265266
typeof_impl.register(cls, func)
266267
for typ, model in MODELS.items():

0 commit comments

Comments
 (0)