Skip to content

Commit c6a48fc

Browse files
author
Jesse Grabowski
committed
Add observed_states helper to StateInfo
1 parent d65fc0a commit c6a48fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pymc_extras/statespace/core/properties.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ def __str__(self) -> str:
167167
f"states: {[s.name for s in self.items]}\nobserved: {[s.observed for s in self.items]}"
168168
)
169169

170+
@property
171+
def observed_states(self) -> tuple[State, ...]:
172+
return tuple(s for s in self.items if s.observed)
173+
170174

171175
@dataclass(frozen=True)
172176
class Shock(Property):

0 commit comments

Comments
 (0)