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

Update odin-js #300

Merged
merged 5 commits into from
Aug 16, 2023
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: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: odin
Title: ODE Generation and Integration
Version: 1.5.5
Version: 1.5.6
Authors@R: c(person("Rich", "FitzJohn", role = c("aut", "cre"),
email = "rich.fitzjohn@gmail.com"),
person("Thibaut", "Jombart", role = "ctb"),
Expand Down
3 changes: 3 additions & 0 deletions R/js.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ odin_js_wrapper_continuous <- function(res) {
use_names = TRUE, return_statistics = FALSE) {
t_js <- to_json_js(t, auto_unbox = FALSE)
y_js <- to_json_js(y, auto_unbox = FALSE, null = "null")
if (!is.null(tcrit)) {
tcrit <- I(tcrit)
}
control <- list(atol = atol,
rtol = rtol,
tcrit = tcrit,
Expand Down
2 changes: 1 addition & 1 deletion inst/js/dust.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/js/odin.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/testthat/test-run-interpolation.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ test_that_odin("linear", {
expect_error(mod$run(c(tt, max(tp) + 1)),
"Integration times do not span interpolation range")

skip_for_target("js", "has better tcrit support")
expect_error(mod$run(tt, tcrit = 3),
"Interpolation failed as .+ is out of range")
})
Expand Down