Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in Version3_1 unit tests #141

Closed
wants to merge 4 commits into from

Conversation

rapoliveira
Copy link
Contributor

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
Copy link
Owner

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

  • RGI - see 06635a7,
  • float() - this will be done separately,
  • adding [0] in 3 cases of 1-values arrays: 6a47319.

@rpoleski rpoleski closed this Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants