Closed
Description
from copy import deepcopy
import numpy as np
import xarray as xr
class Dummy: pass
a0 = np.array([Dummy()])
a1 = deepcopy(a0)
print(a0[0] is a1[0]) # False, as expected
x0 = xr.DataArray(a0, dims='dummy')
x1 = deepcopy(x0)
print(x0.values[0] is x1.values[0]) # unexpectedly True
I think this is a bug, and would be fixed with an extra deepcopy around here