Closed
Description
It doesn't work:
test = ds.TEST
test.values.flags
C_CONTIGUOUS : True
F_CONTIGUOUS : False
OWNDATA : True
WRITEABLE : True
ALIGNED : True
UPDATEIFCOPY : False
test.values
array([ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])
test.values = 0*test.values
test.values
array([ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])
...
But it works:
test = xr.DataArray(np.ones(10),
coords={
'x': range(10)
},
dims=['x']
)
test.values
array([ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])
test.values = 0*test.values
test.values
array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.])