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

Issue with WCS.wcs.cunit equality #8415

Closed
astrofrog opened this issue Feb 11, 2019 · 2 comments · Fixed by #8480
Closed

Issue with WCS.wcs.cunit equality #8415

astrofrog opened this issue Feb 11, 2019 · 2 comments · Fixed by #8480

Comments

@astrofrog
Copy link
Member

The WCS.wcs.cunit attribute uses a class called UnitListProxy - and it seems that class doesn't correctly define __eq__:

In [47]: wcs = WCS(naxis=2)

In [48]: wcs.wcs.cunit = ['deg', 'm/s']

In [49]: wcs.wcs.cunit == wcs.wcs.cunit
Out[49]: False

I think this should be treated as a bug.

@geekypathak21
Copy link
Contributor

@astrofrog I want to resolve this bug but I can't able to find definition of class UnitListProxy can you please give some elaboration about this class

@astrofrog
Copy link
Member Author

@himanshupathak21061998 - the class is defined in https://github.com/astropy/astropy/blob/master/astropy/wcs/src/unit_list_proxy.c (it's written in C)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants