LSSTDESC / rail_astro_tools

Rail utility stages that depend on astronomy package such as healpy, astropy etc...
MIT License
0 stars 0 forks source link

Fix error with new numpy version #46

Closed BStoelzner closed 3 months ago

BStoelzner commented 3 months ago

np.product doesn't work with the new numpy, so I changed it to np.prod

BStoelzner commented 3 months ago

The tests seem to fail because of an incompatibility between numpy and pandas, see https://github.com/numpy/numpy/issues/26710 A popular solution at the moment seems to be to just downgrade numpy or pandas.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.59%. Comparing base (60d6359) to head (064be05).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #46 +/- ## ========================================== + Coverage 97.97% 99.59% +1.61% ========================================== Files 7 7 Lines 742 738 -4 ========================================== + Hits 727 735 +8 + Misses 15 3 -12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

BStoelzner commented 3 months ago

Another option would be to require pandas>=2.2.2, as this seems to be the first version that is compatible with numpy 2.0, see https://pandas.pydata.org/docs/whatsnew/v2.2.2.html#pandas-2-2-2-is-now-compatible-with-numpy-2-0

BStoelzner commented 3 months ago

I just tested setting pandas>=2.2.2, but this leads to a conflict with photerr because this requires pandas<2.0.0. @jfcrenshaw, is there a possibility to make photerr compatible with pandas 2.0?

ztq1996 commented 3 months ago

Okay here is the thing:

photerr==1.1.0 requires pandas>1.4.3 <2.0.0 Now photerr==1.3.0 has loosen the requirement to pandas>1.4.3 only, but it only supports python>3.10, so python 3.9 still won't work.

ztq1996 commented 3 months ago

ok