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

Handle "np.asfarray was removed in the NumPy 2.0 release" #15233

Closed
pllim opened this issue Aug 27, 2023 · 0 comments · Fixed by #15235
Closed

Handle "np.asfarray was removed in the NumPy 2.0 release" #15233

pllim opened this issue Aug 27, 2023 · 0 comments · Fixed by #15235

Comments

@pllim
Copy link
Member

pllim commented Aug 27, 2023

Example log: https://github.com/astropy/astropy/actions/runs/5989440429/job/16245628701

Need to update the astropy/units/quantity_helper/function_helpers.py module.

astropy/units/__init__.py:23: in <module>
    from .quantity import *
astropy/units/quantity.py:35: in <module>
    from .quantity_helper import can_have_arbitrary_unit, check_output, converters_and_unit
astropy/units/quantity_helper/__init__.py:16: in <module>
    from . import erfa, function_helpers, helpers, scipy_special
astropy/units/quantity_helper/function_helpers.py:185: in <module>
    np.copy, np.asfarray, np.real_if_close, np.sort_complex, np.resize,
numpy/__init__.py:351: in __getattr__
    raise AttributeError(
E   AttributeError: `np.asfarray` was removed in the NumPy 2.0 release. Use `np.asarray` with a proper dtype instead.
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.

1 participant