Skip to content

Commit 77e9101

Browse files
committed
Refactor observables initialization in BayesianModel
Simplifies the construction of the observables array by using model.get_state_order with as_indices=True and modeled=True, replacing the previous list comprehension.
1 parent 59b73fd commit 77e9101

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

catalax/mcmc/mcmc.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,7 @@ def __init__(
329329
]
330330

331331
self.observables = jnp.array(
332-
[
333-
i
334-
for i, state in enumerate(model.get_state_order())
335-
if model.odes[state].observable
336-
]
332+
model.get_state_order(as_indices=True, modeled=True)
337333
)
338334

339335
def __call__(

0 commit comments

Comments
 (0)