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

Minor typos #287

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Minor typos #287

wants to merge 3 commits into from

Conversation

CGMossa
Copy link

@CGMossa CGMossa commented May 4, 2023

Thanks for accepting my previous issue. I'm exploring odin. I find it very lovely.

Found more typos. This time a PR is submitted instead.

I'd like to also hijack this PR and ask about this:

odin::odin({
  update(S) <- -beta * S * I
  update(I) <- +beta * S * I
  N <- S + I

  beta <- user(0.005)
  initial(S) <- 100.0
  initial(I) <- 1.0
}, verbose = TRUE, validate = TRUE, target = "c", pretty = TRUE,
  skip_cache = TRUE) ->
  model_generator
model_generator$new() -> model
model$run(seq.default(0, 5, length.out = 25))
Error: Expected integer input for 'step'
Called from: as_integer(step)

Why is that? Passing numeric steps for the lorenz example works.

> traceback()
4: stop(sprintf("Expected integer input for '%s'", name), call. = FALSE)
3: as_integer(step)
2: private$odin$wrapper_run_discrete(self, private, step, y, ..., 
       use_names = use_names) at odin.R#100
1: model$run(seq.default(0, 5, length.out = 25))

see
```
mod <- lorenz()
Warning message:
'lorenz(...)' is deprecated; please use 'lorenz$new(...)' instead
```
@CGMossa
Copy link
Author

CGMossa commented May 4, 2023

Somehow it works when I correct the albeit stupid mistake deriv instead of update.. But I guess that makes total sense.

@CGMossa
Copy link
Author

CGMossa commented May 5, 2023

Perfect! This works and may get reviewed now.

@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (938cb5d) 100.00% compared to head (bf2c834) 100.00%.

❗ Current head bf2c834 differs from pull request most recent head 048ad05. Consider uploading reports for the commit 048ad05 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #287   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           46        46           
  Lines         5416      5416           
=========================================
  Hits          5416      5416           
Impacted Files Coverage Δ
R/common.R 100.00% <ø> (ø)
R/ir_parse.R 100.00% <100.00%> (ø)
R/ir_parse_config.R 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant