-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Make output of to_geodetic a namedtuple #6237
Conversation
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.
I've been meaning to change these things to structured arrays at some point, but have been stopped by the need to have different units. This makes that path forward slightly harder (would need to be based on a recarray
, I suppose), but, heck, this is definitely an improvement! So, 👍 from me.
Only question: the class itself has full names as the attributes (longitude, latitude, height); it is perhaps slightly confusing to use short names here. On the other hand, in hindsight, I think EarthLocation
should have had short names -- even the initializer uses them! So, probably more a reason to think of eventually deprecating the long names...
Appveyor had a very pecular failure - so I restarted it. |
@mhvk - good point on (If you think that's too agressive, can skip the deprecation for now, but I think adding |
I think it is good to deprecate the long names, and a LTS is a good time to do it! |
But we do need to mention the deprecation in |
@mhvk - the coverage decrease must be unrelated as commits before that passed it. |
It is probably that the now deprecated properties do not get used at all -- anyway, not important. |
My guess would be that master changed since, and coveralls seems to compare the coverage of the given PR to the latest run it had. So after a rebase/merging, this decrease should go away. |
Updated the |
I am very surprised that tests passed. When I run code from one of the tests still using deprecation |
Oh, wait... Astropy's |
This is a very straightforward PR that does just what it says: makes
EarthLocation.to_geodetic
output a namedtuple instead of a regular tuple, allowing things like:which seems a lot more readable than:
While working on #5752 and #6226 et al I realized this would make some things a lot easier...