Repository navigation
Conversation
This warning is not specific to this PR, but happens on generally on numpy 2.0 or 2.1 and python 3.10, 3.11 (maybe later too). It was not seen before because CI did not test the relevant combinations.
|
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.
|
| "error", | ||
| # https://github.com/astropy/astropy/issues/18126 | ||
| "ignore:'_UnionGenericAlias' is deprecated and slated for removal in Python 3.17:DeprecationWarning", # not PYTHON_LT_3_14 | ||
| # Weird warning from the vectorized do_format in Angle.to_string. low numpy/python? |
There was a problem hiding this comment.
| # Weird warning from the vectorized do_format in Angle.to_string. low numpy/python? |
|
Hi humans 👋 - this pull request hasn't had any new commits for approximately 4 months. I plan to close this in 30 days if the pull request doesn't have any new commits by then. In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary. If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock. If you believe I commented on this pull request incorrectly, please report this here. |
|
I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks! If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here. |
This pull request is to address a very minor problem, of getting a
RuntimeErrorfromAngle.to_string()on older numpy combined with older python (and apparently only if installed in the way our CI does it; @pllim cannot reproduce it). It basically avoids usingnp.vectorizeand instead explicitly iterates. Not elegant, but it works.Note that this is on top of #18986 only because with that PR, the problem is shown in
oldestdeps-- one gets the same warning on main, but this is not caught on CI as relevant combination is not tested. I made it draft for that reason; for now, only look at the last commit.In principle, we could take this opportunity to use the new string type ("T") introduced in numpy 2.0, which would be better for performance and memory usage, but I think that is better done as a more general overhaul.
EDIT: p.s. Perhaps needs discussion on whether this should be backported.
Fixes #18989