Skip to content

[Numpy2] Preprocessor distance_metric returns value 0 instead of -- (masked element) with numpy==2.0.0 for metrics that use np.sqrt or da.sqrt #2460

@valeriupredoi

Description

@valeriupredoi
FAILED tests/unit/preprocessor/_compare_with_refs/test_compare_with_refs.py::test_distance_metric[weighted_pearsonr-nan-1.0-Pearson's r-pearsonr_tas-1] - AssertionError: 
FAILED tests/unit/preprocessor/_compare_with_refs/test_compare_with_refs.py::test_distance_metric_masked_data[emd-1.98625-0.0-EMD-emd_tas-K-True] - AssertionError: 
FAILED tests/unit/preprocessor/_compare_with_refs/test_compare_with_refs.py::test_distance_metric_fully_masked_data[rmse-2.34520788-0.0-RMSE-rmse_tas-K-True] - AssertionError: 
FAILED tests/unit/preprocessor/_compare_with_refs/test_compare_with_refs.py::test_distance_metric_fully_masked_data[rmse-2.34520788-0.0-RMSE-rmse_tas-K-False] - AssertionError: 
FAILED tests/unit/preprocessor/_compare_with_refs/test_compare_with_refs.py::test_distance_metric_fully_masked_data[weighted_rmse-2.0-0.0-RMSE-rmse_tas-K-True] - AssertionError: 
FAILED tests/unit/preprocessor/_compare_with_refs/test_compare_with_refs.py::test_distance_metric_fully_masked_data[weighted_rmse-2.0-0.0-RMSE-rmse_tas-K-False] - AssertionError:

could be Scipy could be something else, this needs a bit of due dilligence 🍺

Metadata

Metadata

Assignees

Labels

Numpy2bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions