8000 make sure to copy the data of the `DatetimeIndex` (#9419) · hollymandel/xarray@a967d68 · GitHub
[go: up one dir, main page]

Skip to content

Commit a967d68

Browse files
keewishollymandel
authored andcommitted
make sure to copy the data of the DatetimeIndex (pydata#9419)
1 parent 7cb9708 commit a967d68

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)
0