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

Change 'np.NaN' to 'np.nan' re: Numpy 2.0 #272

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nowcast/figures/research_ferries.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@
# more of the surrounding grid point are land with NaN.
interp_area = sal_a[x1 - 1 : x1 + 2, y1 - 1 : y1 + 2]
if interp_area.size - np.count_nonzero(interp_area) >= 4:
sal_a_idw = np.NaN
sal_b_idw = np.NaN
sal_a_idw = np.nan
sal_b_idw = np.nan

Check warning on line 310 in nowcast/figures/research_ferries.py

View check run for this annotation

Codecov / codecov/patch

nowcast/figures/research_ferries.py#L309-L310

Added lines #L309 - L310 were not covered by tests
else:
for i in np.arange(x1 - 1, x1 + 2):
for j in np.arange(y1 - 1, y1 + 2):
Expand Down
2 changes: 1 addition & 1 deletion nowcast/figures/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def interp_to_model_time(t_model, values, t_values):
t_values_wrt_epoch = np.array([(t - epoch).total_seconds() for t in t_values])
t_model_wrt_epoch = np.array([(t - epoch).total_seconds() for t in t_model])
return np.interp(
t_model_wrt_epoch, t_values_wrt_epoch, values, left=np.NaN, right=np.NaN
t_model_wrt_epoch, t_values_wrt_epoch, values, left=np.nan, right=np.NaN
)


Expand Down