MCPcopy
hub / github.com/pydata/xarray / test_as_compatible_data_writeable

Function test_as_compatible_data_writeable

xarray/tests/test_variable.py:76–86  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

74 ],
75)
76def test_as_compatible_data_writeable(data):
77 # In pandas 3 the mode.copy_on_write option defaults to True, so the option
78 # setting logic can be removed once our minimum version of pandas is
79 # greater than or equal to 3.
80 if not has_pandas_3:
81 pd.set_option("mode.copy_on_write", True)
82 # GH8843, ensure writeable arrays for data_vars even with
83 # pandas copy-on-write mode
84 assert as_compatible_data(data).flags.writeable
85 if not has_pandas_3:
86 pd.reset_option("mode.copy_on_write")
87
88
89class VariableSubclassobjects(NamedArraySubclassobjects, ABC):

Callers

nothing calls this directly

Calls 1

as_compatible_dataFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…