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

BUG: fix support for gufuncs with more than one core dimension #16120

Merged
merged 1 commit into from Feb 28, 2024

Conversation

mhvk
Copy link
Contributor

@mhvk mhvk commented Feb 27, 2024

In particular, erfa.rxp and erfa.rxr.

This just fixes the bug, and is slightly weird in its treatment of axis. I have a follow-up PR in the works which just adds proper support for axes - but that would be less suitable for backporting.

Fixes #16116

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

In particular, `erfa.rxp` and `erfa.rxr`.
Copy link

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

Comment on lines +787 to +789
tuple(range(-1, -1 - len(sig), -1))
if axis is None
else axis
Copy link
Contributor

Choose a reason for hiding this comment

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

very nice !

Copy link
Contributor

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

I find it pretty elegant for a hack :-)
More importantly, it does fix the issue in a back portable way, so that's more than enough for me. Thank you very much for going at it so quickly !

Copy link
Contributor

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

Actually, now I'm seeing a new error in MaskedArray.__array_ufunc__ in #16070 (which this PR is supposed to unblock) https://github.com/astropy/astropy/actions/runs/8076412008/job/22064849015?pr=16070

I don't know yet if that's a new bug in this PR or if it's also present on main (will inspect). I just wanted to hold off this one until we know more. I'll update my review status as soon as possible !

Copy link
Contributor

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

Okay, so what I'm seeing on #16070 is indeed another, unrelated (but adjacent) bug, see #16123

I don't know that it should be fixed alongside #16116 (maybe so ?), in any case, I think it's okay to merge this one as is. Thanks again !

@mhvk mhvk added backport-v6.0.x on-merge: backport to v6.0.x and removed backport-v6.0.x on-merge: backport to v6.0.x labels Feb 28, 2024
@mhvk mhvk modified the milestone: v6.0.1 Feb 28, 2024
@mhvk
Copy link
Contributor Author

mhvk commented Feb 28, 2024

@pllim - this was reviewed by @neutrinoceros, which I think should suffice. Could you merge for us?

Copy link
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Approving by proxy. Thanks!

(I don't grok this but I trust you...)

@pllim pllim merged commit b02ab67 into astropy:main Feb 28, 2024
33 of 37 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/astropy that referenced this pull request Feb 28, 2024
@mhvk mhvk deleted the masked-erfa-rxp-bug branch February 28, 2024 17:05
pllim added a commit that referenced this pull request Feb 28, 2024
…120-on-v6.0.x

Backport PR #16120 on branch v6.0.x (BUG: fix support for gufuncs with more than one core dimension)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: MaskedNDArray.__array_ufunc__ breaks for erfa.rxp
3 participants