Skip to content

Numpy deprecation warnings in soiling algorithm #445

@martin-springer

Description

@martin-springer

Describe the bug
There are a few numpy deprecation warnings left in soiling_cods_test.py

Full error message and traceback
rdtools/test/soiling_cods_test.py: 9322 warnings
/home/runner/work/rdtools/rdtools/rdtools/soiling.py:2219: DeprecationWarning:

Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)

rdtools/test/soiling_cods_test.py: 50 warnings
/home/runner/work/rdtools/rdtools/rdtools/soiling.py:1513: DeprecationWarning:

Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)

rdtools/test/soiling_cods_test.py: 50 warnings
/home/runner/work/rdtools/rdtools/rdtools/soiling.py:1514: DeprecationWarning:

Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)

To Reproduce
Run tests.

Expected behavior
No deprecation warnings.

Additional context
Those warnings should be addressed with the Soiling PR #435.

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