Skip to content

Commit a539b72

Browse files
authored
make sure to copy the data of the DatetimeIndex (#9419)
1 parent e133e9e commit a539b72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/tests/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ def test_chunk_by_frequency(self, freq: str, calendar: str, add_gap: bool) -> No
12171217
ΔN = 28
12181218
time = xr.date_range(
12191219
"2001-01-01", periods=N + ΔN, freq="D", calendar=calendar
1220-
).to_numpy()
1220+
).to_numpy(copy=True)
12211221
if add_gap:
12221222
# introduce an empty bin
12231223
time[31 : 31 + ΔN] = np.datetime64("NaT")

0 commit comments

Comments
 (0)