Skip to content

Commit

Permalink
make sure to copy the data of the DatetimeIndex (#9419)
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Sep 3, 2024
1 parent e133e9e commit a539b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ def test_chunk_by_frequency(self, freq: str, calendar: str, add_gap: bool) -> No
ΔN = 28
time = xr.date_range(
"2001-01-01", periods=N + ΔN, freq="D", calendar=calendar
).to_numpy()
).to_numpy(copy=True)
if add_gap:
# introduce an empty bin
time[31 : 31 + ΔN] = np.datetime64("NaT")
Expand Down

0 comments on commit a539b72

Please sign in to comment.