rpoleski / MulensModel

Microlensing Modelling package
https://rpoleski.github.io/MulensModel/
Other
57 stars 15 forks source link

Fix warnings in Version3_1 unit tests #141

Closed rapoliveira closed 5 months ago

rapoliveira commented 5 months ago

I applied two recent changes from master branch to the Version3_1 branch, in order to solve warnings in the unit tests. The first change is related to interp2d replacing by RGI (issue #74, PR #113) and the second is about NumPy deprecation warnings related to converting length-1 arrays into floats (issue #127, PR #130).

Previously, there were 89 warnings and now there are only 9. The missing warnings seems to have been inserted on purpose, so I kept them.

The following two tests were failing with TypeError:

FAILED source/MulensModel/tests/test_Model.py::TestBLPS02AC::test_mag_calculation_1 - TypeError: only length-1 arrays can be converted to Python scalars
FAILED source/MulensModel/tests/test_Model.py::TestBLPS02AC::test_mag_calculation_2 - TypeError: only length-1 arrays can be converted to Python scalars

and now only the first one is failing with AssertionError: FAILED tests/test_Model.py::TestBLPS02AC::test_mag_calculation_1 - AssertionError:

rpoleski commented 5 months ago

For simplicity, I've committed the changes directly to Version3_1 branch, because only some of this changes were incorporated: