Skip to content

Commit

Permalink
numpy 2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskoenig committed Jan 31, 2025
1 parent 1969468 commit 7f75b82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sbmlsim/fit/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def _datapoints_df(self, x: np.ndarray) -> pd.DataFrame:
residuals = res_data["residuals"][k]
for ix in range(len(y_obs)):
if not y_ref_err_type:
y_err = np.NaN
y_err = np.nan
else:
y_err = y_ref_err[ix]

Expand Down
2 changes: 1 addition & 1 deletion src/sbmlsim/fit/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def initialize(
# handle missing data (0.0 and NaN)
if y_ref_err is not None:
# remove 0.0 from y-error
y_ref_err[(y_ref_err == 0.0)] = np.NAN
y_ref_err[(y_ref_err == 0.0)] = np.nan
if np.all(np.isnan(y_ref_err)):
# handle special case of all NaN errors
logger.warning(
Expand Down

0 comments on commit 7f75b82

Please sign in to comment.