Skip to content

Statespace: Don't automatically save statespace matrices as Deterministic variables #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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