Skip to content
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

Fix RDataReporting::observables_likelihood #2633

Merged
merged 1 commit into from
Dec 19, 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
2 changes: 2 additions & 0 deletions python/tests/test_swig_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,9 @@ def test_reporting_mode_obs_llh(sbml_example_presimulation_module):
assert rdata.sy.size > 0
assert rdata.ssigmay.size > 0
assert rdata.sllh.size > 0
assert not np.isnan(rdata.sllh).any()
case amici.SensitivityMethod.adjoint:
assert rdata.sy is None
assert rdata.ssigmay is None
assert rdata.sllh.size > 0
assert not np.isnan(rdata.sllh).any()
1 change: 1 addition & 0 deletions src/rdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ void ReturnData::applyChainRuleFactorToSimulationResults(Model const& model) {

void ReturnData::initializeObjectiveFunction(bool enable_chi2) {
if (rdata_reporting == RDataReporting::likelihood
|| rdata_reporting == RDataReporting::observables_likelihood
|| rdata_reporting == RDataReporting::full) {
llh = 0.0;
std::fill(sllh.begin(), sllh.end(), 0.0);
Expand Down
Loading