Skip to content

Commit c068382

Browse files
authored
Update util.py
1 parent 2afd897 commit c068382

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

pymc/util.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333

3434
from pymc.exceptions import BlockModelAccessError
3535

36-
# ---- User-facing coordinate types ----
36+
# User-facing coordinate types
3737
CoordValue: TypeAlias = Sequence[Hashable] | np.ndarray | None
3838
Coords: TypeAlias = Mapping[str, CoordValue]
3939

40-
# ---- Internal strong coordinate types ----
40+
# Internal strong coordinate types
4141
StrongCoordValue: TypeAlias = tuple[Hashable, ...] | None
4242
StrongCoords: TypeAlias = Mapping[str, StrongCoordValue]
4343

44-
# ---- Internal strong dimension/shape types ----
44+
# Internal strong dimension/shape types
4545
StrongDims: TypeAlias = tuple[str, ...]
4646
StrongShape: TypeAlias = tuple[int, ...]
4747

@@ -60,6 +60,17 @@
6060
# Strong / normalized versions used internally
6161
StrongDimsWithEllipsis: TypeAlias = Sequence[str | EllipsisType]
6262
StrongSize: TypeAlias = TensorVariable | tuple[int | Variable, ...]
63+
"""
64+
Type alias groups:
65+
66+
- User-facing types (Coords, CoordValue, Shape, Dims, Size) represent the flexible inputs
67+
accepted from users when defining models.
68+
69+
- Strong/internal types (StrongCoords, StrongDims, StrongShape, StrongSize, etc.) represent
70+
normalized, fully-validated forms used internally after processing.
71+
72+
These distinctions allow looser user input while keeping strict internal consistency.
73+
"""
6374

6475

6576
class _UnsetType:

0 commit comments

Comments
 (0)