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
The mlds.to_features() and mlds.from_features() methods should be idempotent. Here is an example where this breaks, currently:
mlds.to_features()
mlds.from_features()
import pandas as pd import numpy as np import xarray as xr from xarray_filters import from_features, to_features, MLDataset index = pd.MultiIndex.from_product((np.arange(2), np.arange(2, 4)), names=('x', 'y')) arr1 = xr.DataArray(np.random.uniform(0,1, (4, 1)), coords=[('space', index), ('layer', ['pressure'])], dims=('space', 'layer'), name='features') dset1 = from_features(arr1) dset2 = dset1.to_features() dset2.to_features() # fails here
Traceback:
Traceback (most recent call last): File "test.py", line 12, in <module> dset2.to_features() ... ValueError: conflicting MultiIndex level name(s): 'space' (space), (space) 'layer' (space), (layer)
The text was updated successfully, but these errors were encountered:
Fixed by #45
Sorry, something went wrong.
PeterDSteinberg
No branches or pull requests
The
mlds.to_features()
andmlds.from_features()
methods should be idempotent. Here is an example where this breaks, currently:Traceback:
The text was updated successfully, but these errors were encountered: