Skip to content

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

Closed

Description

@pllim

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions