-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
What is your issue?
This line fails with pd.set_options("mode.copy_on_write", True)
xarray/xarray/tests/__init__.py
Line 329 in c9d3084
assert all(obj.data.flags.writeable for obj in obj.variables.values()) |
We'll need to fix this before Pandas 3 is released in April:
xarray/xarray/tests/__init__.py
Line 329 in c9d3084
assert all(obj.data.flags.writeable for obj in obj.variables.values()) |
Here's a test
def example():
obj = Dataset()
obj["dim2"] = ("dim2", 0.5 * np.arange(9))
obj["time"] = ("time", pd.date_range("2000-01-01", periods=20)
print({k: v.data.flags for k, v in obj.variables.items()})
return obj
example()
pd.set_options("mode.copy_on_write", True)
example()