-
-
Notifications
You must be signed in to change notification settings - Fork 2k
ERFA not scalar-proof #3135
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
ERFA not scalar-proof #3135
Conversation
|
The problem is actually easy to resolve, with two small changes in |
e122ffa to
04a0047
Compare
04a0047 to
c7c6a74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this have an unintended consequence of silencing warnings when a scalar is passed in? That is, if a scalar statcode is 1, this will convert it to an empty array and just pass through silently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the next line with np.unique(statcodes) will still have one entry -- also, I added a test to make sure (since, yes, I did do it wrong several times...).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, gotcha, because we're in an if statement that already ensures errors are present.
|
@mhvk - now on how to do this: currently what you have to do is commit both (Also see my question above about the actual code) |
|
Ok, cool, the code looks good to me. It could be merged as-is, or you may want to wait on the outcome of #3134 ... |
Credit goes to @mhvk
Credit goes to @mhvk
Credit goes to @mhvk
|
Included in #3141, so closing. |
While trying to use the full multi-D flexibility of the new
erfaroutines inTime, it turns out not all parts can handle scalars:Here, the problem is actually that this value of
jdcauses a warning; it works fine for a julian date that is within the expected range: