Repository navigation
Fix angle/unit parsing - #1388
Conversation
There was a problem hiding this comment.
Just to be clear, should this not raise an error? (inconsistent unit/separator)
There was a problem hiding this comment.
It could raise an error, but I think it's best if it doesn't. Imagine loading in a bunch of angles from a file. You ultimately want them in degrees, but you don't care what their initial unit is.
There was a problem hiding this comment.
I agree with @mdboom on the behavior here. I haven't looked at the code change, but the new test is what I would expect and looks good.
|
Just out of curiosity, what does this fix do for the first two examples of unexpected behavior in #1387 when creating an ICRSCoordinate? |
|
I think it fixes #1387 -- I've put the results with the PR over there, but @taldcroft should confirm. |
… given unit and the unit in the string do not match
This is a fix for a bug mentioned in #1387.
I don't know if it fixes the bulk of #1387, but it needs to be fixed regardless.