Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Let quantity_support also support Quantity subclasses #8818

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

Merged
merged 2 commits into from
Jun 14, 2019

Conversation

mhvk
Copy link
Contributor

@mhvk mhvk commented Jun 10, 2019

Found while debugging plotting problems with __array_function__ enabled in #8808.

Note that this would be fixed by matplotlib/matplotlib#13536; once that is in, we should include a version check.

EDIT: above matplotlib PR is merged, for inclusion in 3.2. I've added a comment in the file.

In particular, that the work-around can be removed once we support
only matplotlib >=3.2.
@codecov
Copy link

codecov bot commented Jun 11, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@8255557). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #8818   +/-   ##
=========================================
  Coverage          ?   86.99%           
=========================================
  Files             ?      400           
  Lines             ?    59464           
  Branches          ?     1100           
=========================================
  Hits              ?    51730           
  Misses            ?     7093           
  Partials          ?      641
Impacted Files Coverage Δ
astropy/visualization/units.py 72.54% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8255557...7e30f4d. Read the comment docs.

@mhvk
Copy link
Contributor Author

mhvk commented Jun 11, 2019

@astrofrog - tests passed before I pushed the ci-skip commit with an additional comment. I think this is good to go in.

@Cadair
Copy link
Member

Cadair commented Jun 11, 2019

Oh!! this is the bug I ran into earlier and didn't understand!!

@mhvk
Copy link
Contributor Author

mhvk commented Jun 12, 2019

@Cadair - it took me absolutely forever until I realized that Latitude was not treated as a Quantity... And only because with __array_function__, plt.scatter really breaks on getting a quantity subclass.

@hamogu
Copy link
Member

hamogu commented Jun 13, 2019

Should there be an issue for removing this once the minimum matplotlib version is high enough? We'll forget otherwise...

@pllim
Copy link
Member

pllim commented Jun 13, 2019

@hamogu , good point! I opened #8832 as a reminder. Thank you.

@mhvk
Copy link
Contributor Author

mhvk commented Jun 14, 2019

@Cadair, @hamogu - would either of you be able to sign off on this? It is really quite a simple PR.

Copy link
Member

@Cadair Cadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me.

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirming @Cadair's approval to be able to merge.

@bsipocz bsipocz merged commit 41930f7 into astropy:master Jun 14, 2019
@bsipocz
Copy link
Member

bsipocz commented Jun 14, 2019

Thank you @mhvk!

bsipocz added a commit that referenced this pull request Jun 14, 2019
Let quantity_support also support Quantity subclasses
bsipocz added a commit that referenced this pull request Jun 14, 2019
Let quantity_support also support Quantity subclasses
@mhvk mhvk deleted the quantity-subclass-support branch June 14, 2019 14:34
pllim added a commit to pllim/astropy that referenced this pull request Jan 25, 2023
and remove unnecessary code added in astropy#8818 and astropy#8782
@pllim pllim mentioned this pull request Jan 25, 2023
10 tasks
pllim added a commit to pllim/astropy that referenced this pull request Jan 25, 2023
and remove unnecessary code added in astropy#8818 and astropy#8782
pllim added a commit to pllim/astropy that referenced this pull request Jan 26, 2023
and remove unnecessary code added in astropy#8818 and astropy#8782
pllim added a commit to pllim/astropy that referenced this pull request Jan 30, 2023
and remove unnecessary code added in astropy#8818 and astropy#8782

Add new JSON for figure tests.
dougbrn pushed a commit to dougbrn/astropy that referenced this pull request Mar 13, 2023
and remove unnecessary code added in astropy#8818 and astropy#8782

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

Successfully merging this pull request may close these issues.

5 participants