Skip to content

Commit eb44c83

Browse files
jessegrabowskiricardoV94
authored andcommitted
Don't add statespace matrices or outputs to PyMC graph by default.
1 parent c36a6c8 commit eb44c83

16 files changed

+580
-380
lines changed

pymc_experimental/statespace/core/representation.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import List, Optional, Tuple, Type, Union
1+
from typing import Optional, Type, Union
22

33
import numpy as np
44
import pytensor
@@ -10,7 +10,7 @@
1010
)
1111

1212
floatX = pytensor.config.floatX
13-
KeyLike = Union[Tuple[Union[str, int]], str]
13+
KeyLike = Union[tuple[Union[str, int]], str]
1414

1515

1616
class PytensorRepresentation:
@@ -228,8 +228,8 @@ def _update_shape(self, key: KeyLike, value: Union[np.ndarray, pt.TensorType]) -
228228
self.shapes[key] = shape
229229

230230
def _add_time_dim_to_slice(
231-
self, name: str, slice_: Union[List[int], Tuple[int]], n_dim: int
232-
) -> Tuple[int]:
231+
self, name: str, slice_: Union[list[int], tuple[int]], n_dim: int
232+
) -> tuple[int]:
233233
# Case 1: There is never a time dim. No changes needed.
234234
if name in NEVER_TIME_VARYING:
235235
return slice_

0 commit comments

Comments
 (0)