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

Failure with dev waldo #9

Closed
hadley opened this issue Apr 13, 2023 · 1 comment
Closed

Failure with dev waldo #9

hadley opened this issue Apr 13, 2023 · 1 comment

Comments

@hadley
Copy link

hadley commented Apr 13, 2023

I see

Failure (test-getLambda.R:26:3): lambda calcs. are correct
lambdas$absolute_basalArea_tplus1/lambdas$absolute_basalArea_t (`actual`) not equal to lambdas$lambda (`expected`).

  `actual[13:19]`: 1 7 2 NaN Inf 0 Inf
`expected[13:19]`: 1 7 2  NA Inf 0 Inf

Because waldo now correctly distinguishes between NA_real_ and NaN. I took a look at the test and it doesn't look like there's an obvious fix there since you're using precomputed reference data. This may suggest that there's a genuine (small) bug in your code.

@aestears
Copy link
Owner

Fixed in the current dev branch: The getLambda() function previously changed NaNs to NAs, but that code has been removed... both to pass the test completely, but also to differentiate from true NAs (i.e. one of the values in t or t+1 are NAs) and NaNs that occur because the t+1 value is 0 https://github.com/aestears/plantTracker/commit/d9ac9da30d77af4cf70923fa808f4956f9cfc8fd

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

No branches or pull requests

2 participants