Skip to content

Commit 0da9559

Browse files
committed
Remove deprecated pymc.typing module after moving aliases to pymc.util
1 parent 3f71100 commit 0da9559

File tree

4 files changed

+16
-32
lines changed

4 files changed

+16
-32
lines changed

pymc/backends/arviz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import pymc
4141

4242
from pymc.model import modelcontext
43-
from pymc.typing import StrongCoords
43+
from pymc.util import StrongCoords
4444

4545
if TYPE_CHECKING:
4646
from pymc.backends.base import MultiTrace

pymc/model/core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@
6565
join_nonshared_inputs,
6666
rewrite_pregrad,
6767
)
68-
from pymc.typing import Coords, CoordValue, StrongCoords
6968
from pymc.util import (
69+
Coords,
70+
CoordValue,
71+
StrongCoords,
7072
UNSET,
7173
WithMemoization,
7274
_UnsetType,
@@ -76,6 +78,7 @@
7678
treedict,
7779
treelist,
7880
)
81+
7982
from pymc.vartypes import continuous_types, discrete_types, typefilter
8083

8184
__all__ = [

pymc/typing.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

pymc/util.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from collections import namedtuple
1919
from collections.abc import Sequence
2020
from copy import deepcopy
21-
from typing import cast
21+
from typing import Mapping, TypeAlias, Hashable, cast
2222

2323
import arviz
2424
import cloudpickle
@@ -31,6 +31,16 @@
3131

3232
from pymc.exceptions import BlockModelAccessError
3333

34+
#Coordinate & Shape Typing
35+
CoordValue: TypeAlias = Sequence[Hashable] | np.ndarray | None
36+
Coords: TypeAlias = Mapping[str, CoordValue]
37+
38+
StrongCoordValue: TypeAlias = tuple[Hashable, ...] | None
39+
StrongCoords: TypeAlias = Mapping[str, StrongCoordValue]
40+
41+
StrongDims: TypeAlias = tuple[str, ...]
42+
StrongShape: TypeAlias = tuple[int, ...]
43+
3444

3545
class _UnsetType:
3646
"""Type for the `UNSET` object to make it look nice in `help(...)` outputs."""

0 commit comments

Comments
 (0)