We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following example:
In [1]: import xarray In [2]: ds = xarray.Dataset(coords={'x': [1, 2, 3]}) In [3]: ds['y'] = ds['x'] In [4]: ds Out[4]: <xarray.Dataset> Size: 48B Dimensions: (x: 3) Coordinates: * x (x) int64 24B 1 2 3 Data variables: y (x) int64 24B 1 2 3 In [5]: ds['y'].variable Out[5]: <xarray.IndexVariable 'x' (x: 3)> Size: 24B array([1, 2, 3]) In [6]: ds['x'].variable is ds['y'].variable Out[6]: False
The assigned variable 'y' still uses an IndexVariable under the hood, which means it has immutable data. This is not very useful.
'y'
Instead, assigning a DataArray that contains a wrapped IndexVariable to a Dataset should create a new varaible of the base Variable type.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What is your issue?
Consider the following example:
The assigned variable
'y'
still uses an IndexVariable under the hood, which means it has immutable data. This is not very useful.Instead, assigning a DataArray that contains a wrapped IndexVariable to a Dataset should create a new varaible of the base Variable type.
The text was updated successfully, but these errors were encountered: