dsavransky / EXOSIMS

Simulator for exoplanet direct imaging space missions
BSD 3-Clause "New" or "Revised" License
27 stars 40 forks source link

np.Inf has been deprecated in numpy 2.0 #391

Closed dsavransky closed 1 month ago

dsavransky commented 1 month ago

Describe the bug As per numpy 2.0 release notes (https://numpy.org/devdocs/release/2.0.0-notes.html#numpy-2-0-python-api-removals), there is no more np.Inf - all instances must be changed to np.inf.

Here are all the places in the code that currently have an np.Inf:

./EXOSIMS/SurveySimulation/linearJScheduler_det_only.py:        A = A + np.diag(np.ones(nStars) * np.Inf)
./EXOSIMS/SurveySimulation/linearJScheduler_orbitChar.py:        A = A + np.diag(np.ones(nStars) * np.Inf)
./EXOSIMS/SurveySimulation/linearJScheduler_DDPC.py:            A = A + np.diag(np.ones(nStars) * np.Inf)
./EXOSIMS/SurveySimulation/tieredScheduler.py:        A = A + np.diag(np.ones(nStars) * np.Inf)
./EXOSIMS/SurveySimulation/linearJScheduler.py:        A = A + np.diag(np.ones(nStars) * np.Inf)
./EXOSIMS/Observatory/SotoStarshade.py:            dV[badSlews_i, badSlew_j] = np.Inf
./EXOSIMS/Prototypes/OpticalSystem.py:        OWA=np.Inf,
./EXOSIMS/Prototypes/OpticalSystem.py:            OWA = np.Inf
./EXOSIMS/Prototypes/OpticalSystem.py:                if (syst["OWA"] == 0) or (syst["OWA"] == np.Inf):
./EXOSIMS/Prototypes/OpticalSystem.py:                    syst["OWA"] = np.Inf * u.arcsec
./EXOSIMS/Prototypes/SurveySimulation.py:            maxAllowedSlewTime[maxAllowedSlewTime < 0] = -np.Inf
./EXOSIMS/Prototypes/SurveySimulation.py:            np.Inf
./EXOSIMS/Prototypes/SurveySimulation.py:        maxAllowedSlewTimes[np.invert(conds)] = -np.Inf
./EXOSIMS/Prototypes/SurveySimulation.py:                minAllowedSlewTimes_nOB[np.invert(conds)] = np.Inf
./EXOSIMS/Prototypes/SurveySimulation.py:                maxAllowedSlewTimes_nOB[np.invert(conds)] = -np.Inf
Saanikachoudhary commented 1 month ago

I can fix this