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

Skip to content

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

Merged
pllim merged 1 commit into
astropy:mainfrom
mhvk:masked-erfa-rxp-bug
Feb 28, 2024
Merged

pllim merged 1 commit into
astropy:mainfrom
mhvk:masked-erfa-rxp-bug

Conversation

@mhvk

@mhvk mhvk commented Feb 27, 2024

Copy link
Copy Markdown
Contributor

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`.
@github-actions

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

very nice !

@neutrinoceros neutrinoceros left a comment

Copy link
Copy Markdown
Contributor

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 !

@neutrinoceros neutrinoceros left a comment

Copy link
Copy Markdown
Contributor

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 !

@neutrinoceros neutrinoceros left a comment

Copy link
Copy Markdown
Contributor

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 modified the milestone: v6.0.1 Feb 28, 2024
@mhvk

mhvk commented Feb 28, 2024

Copy link
Copy Markdown
Contributor Author

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

@pllim pllim left a comment

Copy link
Copy Markdown
Member

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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: MaskedNDArray.__array_ufunc__ breaks for erfa.rxp

3 participants