|
33 | 33 |
|
34 | 34 | from pymc.exceptions import BlockModelAccessError |
35 | 35 |
|
36 | | -# ---- User-facing coordinate types ---- |
| 36 | +# User-facing coordinate types |
37 | 37 | CoordValue: TypeAlias = Sequence[Hashable] | np.ndarray | None |
38 | 38 | Coords: TypeAlias = Mapping[str, CoordValue] |
39 | 39 |
|
40 | | -# ---- Internal strong coordinate types ---- |
| 40 | +# Internal strong coordinate types |
41 | 41 | StrongCoordValue: TypeAlias = tuple[Hashable, ...] | None |
42 | 42 | StrongCoords: TypeAlias = Mapping[str, StrongCoordValue] |
43 | 43 |
|
44 | | -# ---- Internal strong dimension/shape types ---- |
| 44 | +# Internal strong dimension/shape types |
45 | 45 | StrongDims: TypeAlias = tuple[str, ...] |
46 | 46 | StrongShape: TypeAlias = tuple[int, ...] |
47 | 47 |
|
|
60 | 60 | # Strong / normalized versions used internally |
61 | 61 | StrongDimsWithEllipsis: TypeAlias = Sequence[str | EllipsisType] |
62 | 62 | 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 | +""" |
63 | 74 |
|
64 | 75 |
|
65 | 76 | class _UnsetType: |
|
0 commit comments