Skip to content

Commit

Permalink
numpy 2 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mathause committed Mar 7, 2024
1 parent 10f297e commit 153c8e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cf_xarray/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _guess_bounds_2d(da, dims):
# At this point, we might have different corners for adjacent cells, we average them together to have a nice grid
# To make this vectorized and keep the edges, we'll pad with NaNs and ignore them in the averages
daXYp = (
daXY.pad({d: (1, 1) for d in dims}, mode="constant", constant_values=np.NaN)
daXY.pad({d: (1, 1) for d in dims}, mode="constant", constant_values=np.nan)

Check warning on line 51 in cf_xarray/helpers.py

View check run for this annotation

Codecov / codecov/patch

cf_xarray/helpers.py#L51

Added line #L51 was not covered by tests
.transpose(*dims, "Xbnds", "Ybnds")
.values
) # Tranpose for an easier notation
Expand Down

0 comments on commit 153c8e8

Please sign in to comment.