Skip to content

Commit

Permalink
Don't add statespace matrices or outputs to PyMC graph by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegrabowski authored and ricardoV94 committed Feb 13, 2024
1 parent c36a6c8 commit 015ba1f
Show file tree
Hide file tree
Showing 16 changed files with 580 additions and 380 deletions.
8 changes: 4 additions & 4 deletions pymc_experimental/statespace/core/representation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional, Tuple, Type, Union
from typing import Optional, Type, Union

import numpy as np
import pytensor
Expand All @@ -10,7 +10,7 @@
)

floatX = pytensor.config.floatX
KeyLike = Union[Tuple[Union[str, int]], str]
KeyLike = Union[tuple[Union[str, int]], str]


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

def _add_time_dim_to_slice(
self, name: str, slice_: Union[List[int], Tuple[int]], n_dim: int
) -> Tuple[int]:
self, name: str, slice_: Union[list[int], tuple[int]], n_dim: int
) -> tuple[int]:
# Case 1: There is never a time dim. No changes needed.
if name in NEVER_TIME_VARYING:
return slice_
Expand Down
Loading

0 comments on commit 015ba1f

Please sign in to comment.