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

_can_pass_early with missing #270

Closed
theogf opened this issue Feb 14, 2023 · 3 comments
Closed

_can_pass_early with missing #270

theogf opened this issue Feb 14, 2023 · 3 comments

Comments

@theogf
Copy link
Contributor

theogf commented Feb 14, 2023

It's me again!

I have an issue on one of my test_rrule involving missing values. The _can_pass_early test fails to pass as both actual and expected are equal to missing. Naturally missing == missing returns missing and make the test fails. Using isequal solves the issue but I guess that's also not the wanted behaviour.

Any clue on how to solve this?

@oxinabox
Copy link
Member

When we thought about this before, we were like "Let's not spend to much time thinking about this, when is a tangent actually going to be missing"
so we didn't think on it too hard.

Can you tell more about why that tangent is missing?
It will help us determine what the correct behavour is.

@theogf
Copy link
Contributor Author

theogf commented Feb 22, 2023

So the Tangent itself is not missing, it is already properly set to NoTangent and after more care, I would argue it's more a problem of #271 where missing actually comes from to_vec with FiniteDifferences producing ismissing. In the context of test_approx, iszero(missing) is called and hence the missing comparison.

@oxinabox
Copy link
Member

I see.
Yeah so it was getting expected wrong because FiniteDifferences couldn't handle it,
and actual was not infact set to missing.

Sounds like we should either change it so that that _can_pass_early should return false (rather than erroring with missing but that's low priority.
I guess it would be an easy check to add as ismissing(expected) but also if you are ended up with expected===missing probably something else is wrong anyway and so the error is kinda more useful?

So maybe we can close this?

@theogf theogf closed this as completed Feb 23, 2023
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