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
From https://github.com/pystatgen/sgkit/runs/6213029601?check_suite_focus=true:
=================================== FAILURES =================================== ________________________ test_variables_in_multi_index _________________________ dummy_ds = <xarray.Dataset> Dimensions: (d1: 3, bar: 3) Coordinates: * bar (bar) int64 1 2 3 Dimensions without coordinates: d1 Data variables: foo (d1) int64 1 2 3 def test_variables_in_multi_index(dummy_ds: xr.Dataset) -> None: # create a multi index > ds = dummy_ds.set_index({"ind": ("foo", "bar")}) sgkit/tests/test_variables.py:98: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/xarray/core/dataset.py:3766: in set_index idx, idx_vars = PandasMultiIndex.from_variables_maybe_expand( /opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/xarray/core/indexes.py:660: in from_variables_maybe_expand _check_dim_compat({**current_variables, **variables}) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ variables = {'bar': <xarray.IndexVariable 'bar' (bar: 3)> array([1, 2, 3]), 'foo': <xarray.Variable (d1: 3)> array([1, 2, 3])} all_dims = 'equal' def _check_dim_compat(variables: Mapping[Any, Variable], all_dims: str = "equal"): """Check that all multi-index variable candidates are 1-dimensional and either share the same (single) dimension or each have a different dimension. """ if any([var.ndim != 1 for var in variables.values()]): raise ValueError("PandasMultiIndex only accepts 1-dimensional variables") dims = {var.dims for var in variables.values()} if all_dims == "equal" and len(dims) > 1: > raise ValueError( "unmatched dimensions for multi-index variables " + ", ".join([f"{k!r} {v.dims}" for k, v in variables.items()]) ) E ValueError: unmatched dimensions for multi-index variables 'foo' ('d1',), 'bar' ('bar',) /opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/xarray/core/indexes.py:491: ValueError =========================== short test summary info ============================ FAILED sgkit/tests/test_variables.py::test_variables_in_multi_index - ValueEr... = 1 failed, 826 passed, 32 skipped, 2 xfailed, 1 xpassed in 243.48s (0:04:03) ==
The text was updated successfully, but these errors were encountered:
This started failing after #5692 went in.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
From https://github.com/pystatgen/sgkit/runs/6213029601?check_suite_focus=true:
The text was updated successfully, but these errors were encountered: