Skip to content

Deprecation warning from use of numpy.bool #74

@marcpaterno

Description

@marcpaterno

Running pytest -v tests/ when using the most recent numpy generates a deprecation warning:

test/test_sacc2.py: 10 warnings
  /Users/paterno/repos/sacc/sacc/sacc.py:301: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    if indices.dtype != np.bool:

This can be fixed as given in the warning message if we move to numpy 1.20 as a requirement. Since support for numpy 1.19 has already ended this seems like a good solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions