Namedarray generic dim type #11223
Namedarray generic dim type #11223
3 errors, 3 846 fail, 2 792 skipped, 17 644 pass in 4h 19m 21s
Annotations
github-actions / Test Results
12 out of 14 runs with error: xarray.tests.test_dask
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-with-typing pytest-addopts mypy/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts flaky/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
collection failure
collection failure
collection failure
collection failure
collection failure
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1154: in <module>
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mobj#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [make_ds(), make_da()])#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1094: in make_ds
#x1B[0mmap_ds[#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = make_da()#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1087: in make_da
#x1B[0mda.coords[#x1B[33m"#x1B[39;49;00m#x1B[33mcxy#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = (da.x * da.y).chunk({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m4#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m5#x1B[39;49;00m})#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:552: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\dataarray.py#x1B[0m:4905: in _binary_op
#x1B[0mf(#x1B[96mself#x1B[39;49;00m.variable, other_variable_or_arraylike)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:935: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:2438: in _binary_op
#x1B[0mself_data, other_data, dims = _broadcast_compat_data(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3058: in _broadcast_compat_data
#x1B[0mnew_self, new_other = _broadcast_compat_variables(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in _broadcast_compat_variables
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in <genexpr>
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\namedarray\utils.py#x1B[0m:172: in infix_dims
#x1B[0m#x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1154: in <module>
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mobj#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [make_ds(), make_da()])#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1094: in make_ds
#x1B[0mmap_ds[#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = make_da()#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1087: in make_da
#x1B[0mda.coords[#x1B[33m"#x1B[39;49;00m#x1B[33mcxy#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = (da.x * da.y).chunk({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m4#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m5#x1B[39;49;00m})#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:552: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\dataarray.py#x1B[0m:4905: in _binary_op
#x1B[0mf(#x1B[96mself#x1B[39;49;00m.variable, other_variable_or_arraylike)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:935: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:2438: in _binary_op
#x1B[0mself_data, other_data, dims = _broadcast_compat_data(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3058: in _broadcast_compat_data
#x1B[0mnew_self, new_other = _broadcast_compat_variables(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in _broadcast_compat_variables
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in <genexpr>
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\namedarray\utils.py#x1B[0m:172: in infix_dims
#x1B[0m#x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1154: in <module>
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mobj#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [make_ds(), make_da()])#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1094: in make_ds
#x1B[0mmap_ds[#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = make_da()#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1087: in make_da
#x1B[0mda.coords[#x1B[33m"#x1B[39;49;00m#x1B[33mcxy#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = (da.x * da.y).chunk({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m4#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m5#x1B[39;49;00m})#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:552: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\dataarray.py#x1B[0m:4905: in _binary_op
#x1B[0mf(#x1B[96mself#x1B[39;49;00m.variable, other_variable_or_arraylike)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:935: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:2438: in _binary_op
#x1B[0mself_data, other_data, dims = _broadcast_compat_data(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3058: in _broadcast_compat_data
#x1B[0mnew_self, new_other = _broadcast_compat_variables(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in _broadcast_compat_variables
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in <genexpr>
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\namedarray\utils.py#x1B[0m:172: in infix_dims
#x1B[0m#x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1154: in <module>
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mobj#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [make_ds(), make_da()])#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1094: in make_ds
#x1B[0mmap_ds[#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = make_da()#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1087: in make_da
#x1B[0mda.coords[#x1B[33m"#x1B[39;49;00m#x1B[33mcxy#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = (da.x * da.y).chunk({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m4#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m5#x1B[39;49;00m})#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:552: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\dataarray.py#x1B[0m:4905: in _binary_op
#x1B[0mf(#x1B[96mself#x1B[39;49;00m.variable, other_variable_or_arraylike)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:935: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:2438: in _binary_op
#x1B[0mself_data, other_data, dims = _broadcast_compat_data(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3058: in _broadcast_compat_data
#x1B[0mnew_self, new_other = _broadcast_compat_variables(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in _broadcast_compat_variables
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in <genexpr>
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\namedarray\utils.py#x1B[0m:172: in infix_dims
#x1B[0m#x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1154: in <module>
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[33m"#x1B[39;49;00m#x1B[33mobj#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [make_ds(), make_da()])#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1094: in make_ds
#x1B[0mmap_ds[#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = make_da()#x1B[90m#x1B[39;49;00m
^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\tests\test_dask.py#x1B[0m:1087: in make_da
#x1B[0mda.coords[#x1B[33m"#x1B[39;49;00m#x1B[33mcxy#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] = (da.x * da.y).chunk({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m4#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[94m5#x1B[39;49;00m})#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:552: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\dataarray.py#x1B[0m:4905: in _binary_op
#x1B[0mf(#x1B[96mself#x1B[39;49;00m.variable, other_variable_or_arraylike)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\_typed_ops.py#x1B[0m:935: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:2438: in _binary_op
#x1B[0mself_data, other_data, dims = _broadcast_compat_data(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3058: in _broadcast_compat_data
#x1B[0mnew_self, new_other = _broadcast_compat_variables(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in _broadcast_compat_variables
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:3025: in <genexpr>
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mxarray\namedarray\utils.py#x1B[0m:172: in infix_dims
#x1B[0m#x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
Check warning on line 0 in xarray.tests.test_backends.TestZarrDirectoryStore
github-actions / Test Results
8 out of 10 runs failed: test_write_read_select_write[2] (xarray.tests.test_backends.TestZarrDirectoryStore)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestZarrDirectoryStore object at 0x7f8356183010>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_write_read_select_write#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[90m# Test for https://github.com/pydata/xarray/issues/4084#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
ds = create_test_data()#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
#x1B[90m# NOTE: using self.roundtrip, which uses open_dataset, will not trigger the bug.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.create_zarr_target() #x1B[94mas#x1B[39;49;00m initial_store:#x1B[90m#x1B[39;49;00m
ds.to_zarr(initial_store, mode=#x1B[33m"#x1B[39;49;00m#x1B[33mw#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, **#x1B[96mself#x1B[39;49;00m.version_kwargs)#x1B[90m#x1B[39;49;00m
ds1 = xr.open_zarr(initial_store, **#x1B[96mself#x1B[39;49;00m.version_kwargs)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
#x1B[90m# Combination of where+squeeze triggers error on write.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
> ds_sel = ds1.where(ds1.coords[#x1B[33m"#x1B[39;49;00m#x1B[33mdim3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] == #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, drop=#x1B[94mTrue#x1B[39;49;00m).squeeze(#x1B[33m"#x1B[39;49;00m#x1B[33mdim3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/tests/test_backends.py#x1B[0m:3697:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/common.py#x1B[0m:1250: in where
#x1B[0m#x1B[94mreturn#x1B[39;49;00m ops.where_method(#x1B[96mself#x1B[39;49;00m, cond, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/computation/ops.py#x1B[0m:184: in where_method
#x1B[0m#x1B[94mreturn#x1B[39;49;00m apply_ufunc(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/computation/apply_ufunc.py#x1B[0m:1254: in apply_ufunc
#x1B[0m#x1B[94mreturn#x1B[39;49;00m apply_dataset_vfunc(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/computation/apply_ufunc.py#x1B[0m:522: in apply_dataset_vfunc
#x1B[0mlist_of_coords, list_of_indexes = build_output_coords_and_indexes(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/computation/apply_ufunc.py#x1B[0m:252: in build_output_coords_and_indexes
#x1B[0mmerged_vars, merged_indexes = merge_coordinates_without_align(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/structure/merge.py#x1B[0m:465: in merge_coordinates_without_align
#x1B[0mmerged_coords, merged_indexes = merge_collected(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/structure/merge.py#x1B[0m:321: in merge_collected
#x1B[0mequals_this_var, merged_vars[name] = unique_variable(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/structure/merge.py#x1B[0m:146: in unique_variable
#x1B[0mout = out.set_dims(dim_lengths)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/util/deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/util/deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('dim3',), dims_all = ('dim3',), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_backends.TestZarrWriteEmpty
github-actions / Test Results
8 out of 10 runs failed: test_append_overwrite_values[2] (xarray.tests.test_backends.TestZarrWriteEmpty)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestZarrWriteEmpty object at 0x7f83572e3f10>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_append_overwrite_values#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[90m# regression for GH1215#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
data = create_test_data()#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m create_tmp_file(allow_cleanup_failure=#x1B[94mFalse#x1B[39;49;00m) #x1B[94mas#x1B[39;49;00m tmp_file:#x1B[90m#x1B[39;49;00m
#x1B[96mself#x1B[39;49;00m.save(data, tmp_file, mode=#x1B[33m"#x1B[39;49;00m#x1B[33mw#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
> data[#x1B[33m"#x1B[39;49;00m#x1B[33mvar2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][:] = -#x1B[94m999#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/tests/test_backends.py#x1B[0m:1576:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/dataarray.py#x1B[0m:906: in __setitem__
#x1B[0m#x1B[96mself#x1B[39;49;00m.variable[key] = value#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/variable.py#x1B[0m:894: in __setitem__
#x1B[0mvalue = value.set_dims(dims).data#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/util/deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/util/deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('dim1', 'dim2'), dims_all = ('dim1', 'dim2')
missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_backends.TestZarrWriteEmpty
github-actions / Test Results
8 out of 10 runs failed: test_write_read_select_write[2] (xarray.tests.test_backends.TestZarrWriteEmpty)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestZarrWriteEmpty object at 0x7f8357254ad0>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_write_read_select_write#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[90m# Test for https://github.com/pydata/xarray/issues/4084#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
ds = create_test_data()#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
#x1B[90m# NOTE: using self.roundtrip, which uses open_dataset, will not trigger the bug.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.create_zarr_target() #x1B[94mas#x1B[39;49;00m initial_store:#x1B[90m#x1B[39;49;00m
ds.to_zarr(initial_store, mode=#x1B[33m"#x1B[39;49;00m#x1B[33mw#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, **#x1B[96mself#x1B[39;49;00m.version_kwargs)#x1B[90m#x1B[39;49;00m
ds1 = xr.open_zarr(initial_store, **#x1B[96mself#x1B[39;49;00m.version_kwargs)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
#x1B[90m# Combination of where+squeeze triggers error on write.#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
> ds_sel = ds1.where(ds1.coords[#x1B[33m"#x1B[39;49;00m#x1B[33mdim3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m] == #x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, drop=#x1B[94mTrue#x1B[39;49;00m).squeeze(#x1B[33m"#x1B[39;49;00m#x1B[33mdim3#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/tests/test_backends.py#x1B[0m:3697:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/common.py#x1B[0m:1250: in where
#x1B[0m#x1B[94mreturn#x1B[39;49;00m ops.where_method(#x1B[96mself#x1B[39;49;00m, cond, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/computation/ops.py#x1B[0m:184: in where_method
#x1B[0m#x1B[94mreturn#x1B[39;49;00m apply_ufunc(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/computation/apply_ufunc.py#x1B[0m:1254: in apply_ufunc
#x1B[0m#x1B[94mreturn#x1B[39;49;00m apply_dataset_vfunc(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/computation/apply_ufunc.py#x1B[0m:522: in apply_dataset_vfunc
#x1B[0mlist_of_coords, list_of_indexes = build_output_coords_and_indexes(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/computation/apply_ufunc.py#x1B[0m:252: in build_output_coords_and_indexes
#x1B[0mmerged_vars, merged_indexes = merge_coordinates_without_align(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/structure/merge.py#x1B[0m:465: in merge_coordinates_without_align
#x1B[0mmerged_coords, merged_indexes = merge_collected(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/structure/merge.py#x1B[0m:321: in merge_collected
#x1B[0mequals_this_var, merged_vars[name] = unique_variable(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/structure/merge.py#x1B[0m:146: in unique_variable
#x1B[0mout = out.set_dims(dim_lengths)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/util/deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/util/deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/core/variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('dim3',), dims_all = ('dim3',), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31m/home/runner/work/xarray/xarray/xarray/namedarray/utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_backends.TestZarrRegionAuto
github-actions / Test Results
All 10 runs failed: test_zarr_region_auto[2-full-auto] (xarray.tests.test_backends.TestZarrRegionAuto)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestZarrRegionAuto object at 0x0000011282199010>
region = 'auto'
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33mregion#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
[#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[33m"#x1B[39;49;00m#x1B[33mauto#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mfull-auto#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
pytest.param({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[33m"#x1B[39;49;00m#x1B[33mauto#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[96mslice#x1B[39;49;00m(#x1B[94m6#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m)}, #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mmixed-auto#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
],#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_zarr_region_auto#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, region):#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.create() #x1B[94mas#x1B[39;49;00m (target, ds):#x1B[90m#x1B[39;49;00m
ds_region = #x1B[94m1#x1B[39;49;00m + ds.isel(x=#x1B[96mslice#x1B[39;49;00m(#x1B[94m2#x1B[39;49;00m, #x1B[94m4#x1B[39;49;00m), y=#x1B[96mslice#x1B[39;49;00m(#x1B[94m6#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
#x1B[96mself#x1B[39;49;00m.save(target, ds_region, region=region)#x1B[90m#x1B[39;49;00m
ds_updated = xr.open_zarr(target)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
expected = ds.copy()#x1B[90m#x1B[39;49;00m
> expected[#x1B[33m"#x1B[39;49;00m#x1B[33mtest#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][#x1B[94m2#x1B[39;49;00m:#x1B[94m4#x1B[39;49;00m, #x1B[94m6#x1B[39;49;00m:#x1B[94m8#x1B[39;49;00m] += #x1B[94m1#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_backends.py#x1B[0m:7647:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:906: in __setitem__
#x1B[0m#x1B[96mself#x1B[39;49;00m.variable[key] = value#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:894: in __setitem__
#x1B[0mvalue = value.set_dims(dims).data#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x', 'y'), dims_all = ('x', 'y'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_backends.TestZarrRegionAuto
github-actions / Test Results
All 10 runs failed: test_zarr_region_auto[2-mixed-auto] (xarray.tests.test_backends.TestZarrRegionAuto)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestZarrRegionAuto object at 0x0000011282199110>
region = {'x': slice(np.int64(2), np.int64(4), None), 'y': slice(6, 8, None)}
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33mregion#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
[#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[33m"#x1B[39;49;00m#x1B[33mauto#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mfull-auto#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
pytest.param({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[33m"#x1B[39;49;00m#x1B[33mauto#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: #x1B[96mslice#x1B[39;49;00m(#x1B[94m6#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m)}, #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mmixed-auto#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
],#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_zarr_region_auto#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m, region):#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.create() #x1B[94mas#x1B[39;49;00m (target, ds):#x1B[90m#x1B[39;49;00m
ds_region = #x1B[94m1#x1B[39;49;00m + ds.isel(x=#x1B[96mslice#x1B[39;49;00m(#x1B[94m2#x1B[39;49;00m, #x1B[94m4#x1B[39;49;00m), y=#x1B[96mslice#x1B[39;49;00m(#x1B[94m6#x1B[39;49;00m, #x1B[94m8#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
#x1B[96mself#x1B[39;49;00m.save(target, ds_region, region=region)#x1B[90m#x1B[39;49;00m
ds_updated = xr.open_zarr(target)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
expected = ds.copy()#x1B[90m#x1B[39;49;00m
> expected[#x1B[33m"#x1B[39;49;00m#x1B[33mtest#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][#x1B[94m2#x1B[39;49;00m:#x1B[94m4#x1B[39;49;00m, #x1B[94m6#x1B[39;49;00m:#x1B[94m8#x1B[39;49;00m] += #x1B[94m1#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_backends.py#x1B[0m:7647:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:906: in __setitem__
#x1B[0m#x1B[96mself#x1B[39;49;00m.variable[key] = value#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:894: in __setitem__
#x1B[0mvalue = value.set_dims(dims).data#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x', 'y'), dims_all = ('x', 'y'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_backends.TestZarrRegionAuto
github-actions / Test Results
All 10 runs failed: test_zarr_region[2] (xarray.tests.test_backends.TestZarrRegionAuto)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestZarrRegionAuto object at 0x0000011281B1CC90>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_zarr_region#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m.create() #x1B[94mas#x1B[39;49;00m (target, ds):#x1B[90m#x1B[39;49;00m
> ds_transposed = ds.transpose(#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_backends.py#x1B[0m:7704:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:6260: in transpose
#x1B[0m_ = #x1B[96mlist#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('y', 'x')
dims_all = FrozenMappingWarningOnValuesAccess({'x': 5, 'y': 10})
missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_backends.TestNetCDF4ClassicViaH5NetCDFData
github-actions / Test Results
9 out of 12 runs failed: test_append_overwrite_values (xarray.tests.test_backends.TestNetCDF4ClassicViaH5NetCDFData)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestNetCDF4ClassicViaH5NetCDFData object at 0x00000255B6C22350>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_append_overwrite_values#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[90m# regression for GH1215#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
data = create_test_data()#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m create_tmp_file(allow_cleanup_failure=#x1B[94mFalse#x1B[39;49;00m) #x1B[94mas#x1B[39;49;00m tmp_file:#x1B[90m#x1B[39;49;00m
#x1B[96mself#x1B[39;49;00m.save(data, tmp_file, mode=#x1B[33m"#x1B[39;49;00m#x1B[33mw#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
> data[#x1B[33m"#x1B[39;49;00m#x1B[33mvar2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][:] = -#x1B[94m999#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_backends.py#x1B[0m:1576:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:906: in __setitem__
#x1B[0m#x1B[96mself#x1B[39;49;00m.variable[key] = value#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:894: in __setitem__
#x1B[0mvalue = value.set_dims(dims).data#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('dim1', 'dim2'), dims_all = ('dim1', 'dim2')
missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_backends.TestZarrDictStore
github-actions / Test Results
All 9 runs failed: test_append_overwrite_values[3] (xarray.tests.test_backends.TestZarrDictStore)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestZarrDictStore object at 0x00000112838D0610>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_append_overwrite_values#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[90m# regression for GH1215#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
data = create_test_data()#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m create_tmp_file(allow_cleanup_failure=#x1B[94mFalse#x1B[39;49;00m) #x1B[94mas#x1B[39;49;00m tmp_file:#x1B[90m#x1B[39;49;00m
#x1B[96mself#x1B[39;49;00m.save(data, tmp_file, mode=#x1B[33m"#x1B[39;49;00m#x1B[33mw#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
> data[#x1B[33m"#x1B[39;49;00m#x1B[33mvar2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][:] = -#x1B[94m999#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_backends.py#x1B[0m:1576:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:906: in __setitem__
#x1B[0m#x1B[96mself#x1B[39;49;00m.variable[key] = value#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:894: in __setitem__
#x1B[0mvalue = value.set_dims(dims).data#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('dim1', 'dim2'), dims_all = ('dim1', 'dim2')
missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_accessor_str
github-actions / Test Results
All 12 runs failed: test_partition_empty[str] (xarray.tests.test_accessor_str)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
dtype = <class 'numpy.str_'>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_partition_empty#x1B[39;49;00m(dtype) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
values = xr.DataArray([], dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
expected = xr.DataArray(np.zeros((#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m)), dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> res = values.str.partition(sep=#x1B[33m"#x1B[39;49;00m#x1B[33m, #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dim=#x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_accessor_str.py#x1B[0m:2564:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2444: in partition
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._partitioner(func=#x1B[96mself#x1B[39;49;00m._obj.dtype.type.partition, dim=dim, sep=sep)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2391: in _partitioner
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._obj.copy().expand_dims({dim: #x1B[94m0#x1B[39;49;00m}, axis=-#x1B[94m1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:2760: in expand_dims
#x1B[0mds = #x1B[96mself#x1B[39;49;00m._to_temp_dataset().expand_dims(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:4666: in expand_dims
#x1B[0mvariables[k] = v.set_dims(#x1B[96mdict#x1B[39;49;00m(all_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('X', 'ZZ'), dims_all = ('ZZ', 'X'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_accessor_str
github-actions / Test Results
All 12 runs failed: test_partition_empty[bytes] (xarray.tests.test_accessor_str)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
dtype = <class 'numpy.bytes_'>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_partition_empty#x1B[39;49;00m(dtype) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
values = xr.DataArray([], dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
expected = xr.DataArray(np.zeros((#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m)), dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> res = values.str.partition(sep=#x1B[33m"#x1B[39;49;00m#x1B[33m, #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dim=#x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_accessor_str.py#x1B[0m:2564:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2444: in partition
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._partitioner(func=#x1B[96mself#x1B[39;49;00m._obj.dtype.type.partition, dim=dim, sep=sep)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2391: in _partitioner
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._obj.copy().expand_dims({dim: #x1B[94m0#x1B[39;49;00m}, axis=-#x1B[94m1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:2760: in expand_dims
#x1B[0mds = #x1B[96mself#x1B[39;49;00m._to_temp_dataset().expand_dims(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:4666: in expand_dims
#x1B[0mvariables[k] = v.set_dims(#x1B[96mdict#x1B[39;49;00m(all_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('X', 'ZZ'), dims_all = ('ZZ', 'X'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_backends.TestGenericNetCDFData
github-actions / Test Results
All 12 runs failed: test_append_overwrite_values (xarray.tests.test_backends.TestGenericNetCDFData)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
self = <xarray.tests.test_backends.TestGenericNetCDFData object at 0x00000255B75B7790>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_append_overwrite_values#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[90m# regression for GH1215#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
data = create_test_data()#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m create_tmp_file(allow_cleanup_failure=#x1B[94mFalse#x1B[39;49;00m) #x1B[94mas#x1B[39;49;00m tmp_file:#x1B[90m#x1B[39;49;00m
#x1B[96mself#x1B[39;49;00m.save(data, tmp_file, mode=#x1B[33m"#x1B[39;49;00m#x1B[33mw#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
> data[#x1B[33m"#x1B[39;49;00m#x1B[33mvar2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m][:] = -#x1B[94m999#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_backends.py#x1B[0m:1576:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:906: in __setitem__
#x1B[0m#x1B[96mself#x1B[39;49;00m.variable[key] = value#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:894: in __setitem__
#x1B[0mvalue = value.set_dims(dims).data#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('dim1', 'dim2'), dims_all = ('dim1', 'dim2')
missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_accessor_str
github-actions / Test Results
All 12 runs failed: test_split_empty[str] (xarray.tests.test_accessor_str)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
dtype = <class 'numpy.str_'>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_split_empty#x1B[39;49;00m(dtype) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
values = xr.DataArray([], dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
expected = xr.DataArray(np.zeros((#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m)), dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> res = values.str.split(sep=#x1B[33m"#x1B[39;49;00m#x1B[33m, #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dim=#x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_accessor_str.py#x1B[0m:2966:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2644: in split
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._splitter(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2505: in _splitter
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._obj.copy().expand_dims({dim: #x1B[94m0#x1B[39;49;00m}, axis=-#x1B[94m1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:2760: in expand_dims
#x1B[0mds = #x1B[96mself#x1B[39;49;00m._to_temp_dataset().expand_dims(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:4666: in expand_dims
#x1B[0mvariables[k] = v.set_dims(#x1B[96mdict#x1B[39;49;00m(all_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('X', 'ZZ'), dims_all = ('ZZ', 'X'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_accessor_str
github-actions / Test Results
All 12 runs failed: test_split_empty[bytes] (xarray.tests.test_accessor_str)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
dtype = <class 'numpy.bytes_'>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_split_empty#x1B[39;49;00m(dtype) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
values = xr.DataArray([], dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
expected = xr.DataArray(np.zeros((#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m)), dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> res = values.str.split(sep=#x1B[33m"#x1B[39;49;00m#x1B[33m, #x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dim=#x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_accessor_str.py#x1B[0m:2966:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2644: in split
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._splitter(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2505: in _splitter
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._obj.copy().expand_dims({dim: #x1B[94m0#x1B[39;49;00m}, axis=-#x1B[94m1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:2760: in expand_dims
#x1B[0mds = #x1B[96mself#x1B[39;49;00m._to_temp_dataset().expand_dims(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:4666: in expand_dims
#x1B[0mvariables[k] = v.set_dims(#x1B[96mdict#x1B[39;49;00m(all_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('X', 'ZZ'), dims_all = ('ZZ', 'X'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_accessor_str
github-actions / Test Results
All 12 runs failed: test_get_dummies_empty[str] (xarray.tests.test_accessor_str)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
dtype = <class 'numpy.str_'>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_get_dummies_empty#x1B[39;49;00m(dtype) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
values = xr.DataArray([], dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
expected = xr.DataArray(np.zeros((#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m)), dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> res = values.str.get_dummies(dim=#x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_accessor_str.py#x1B[0m:3048:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2831: in get_dummies
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._obj.copy().expand_dims({dim: #x1B[94m0#x1B[39;49;00m}, axis=-#x1B[94m1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:2760: in expand_dims
#x1B[0mds = #x1B[96mself#x1B[39;49;00m._to_temp_dataset().expand_dims(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:4666: in expand_dims
#x1B[0mvariables[k] = v.set_dims(#x1B[96mdict#x1B[39;49;00m(all_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('X', 'ZZ'), dims_all = ('ZZ', 'X'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_accessor_str
github-actions / Test Results
All 12 runs failed: test_get_dummies_empty[bytes] (xarray.tests.test_accessor_str)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
dtype = <class 'numpy.bytes_'>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_get_dummies_empty#x1B[39;49;00m(dtype) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
values = xr.DataArray([], dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
expected = xr.DataArray(np.zeros((#x1B[94m0#x1B[39;49;00m, #x1B[94m0#x1B[39;49;00m)), dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> res = values.str.get_dummies(dim=#x1B[33m"#x1B[39;49;00m#x1B[33mZZ#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_accessor_str.py#x1B[0m:3048:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:2831: in get_dummies
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._obj.copy().expand_dims({dim: #x1B[94m0#x1B[39;49;00m}, axis=-#x1B[94m1#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:2760: in expand_dims
#x1B[0mds = #x1B[96mself#x1B[39;49;00m._to_temp_dataset().expand_dims(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:4666: in expand_dims
#x1B[0mvariables[k] = v.set_dims(#x1B[96mdict#x1B[39;49;00m(all_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('X', 'ZZ'), dims_all = ('ZZ', 'X'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_accessor_str
github-actions / Test Results
All 12 runs failed: test_join_2d[str] (xarray.tests.test_accessor_str)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
dtype = <class 'numpy.str_'>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_join_2d#x1B[39;49;00m(dtype) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
values = xr.DataArray(#x1B[90m#x1B[39;49;00m
[[#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mbb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcccc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m], [#x1B[33m"#x1B[39;49;00m#x1B[33mddddd#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33meeee#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mfff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mY#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
targ_blank_x = xr.DataArray(#x1B[90m#x1B[39;49;00m
[#x1B[33m"#x1B[39;49;00m#x1B[33maddddd#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mbbeeee#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mccccfff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mY#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
targ_space_x = xr.DataArray(#x1B[90m#x1B[39;49;00m
[#x1B[33m"#x1B[39;49;00m#x1B[33ma ddddd#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mbb eeee#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcccc fff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mY#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
targ_blank_y = xr.DataArray(#x1B[90m#x1B[39;49;00m
[#x1B[33m"#x1B[39;49;00m#x1B[33mabbcccc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mdddddeeeefff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
targ_space_y = xr.DataArray(#x1B[90m#x1B[39;49;00m
[#x1B[33m"#x1B[39;49;00m#x1B[33ma bb cccc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mddddd eeee fff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> res_blank_x = values.str.join(dim=#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_accessor_str.py#x1B[0m:3512:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:575: in join
#x1B[0mdimshifted = #x1B[96mlist#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m._obj.transpose(dim, ...))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:3164: in transpose
#x1B[0mvariable = #x1B[96mself#x1B[39;49;00m.variable.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('X', 'Y'), dims_all = ('X', 'Y'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_accessor_str
github-actions / Test Results
All 12 runs failed: test_join_2d[bytes] (xarray.tests.test_accessor_str)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
dtype = <class 'numpy.bytes_'>
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_join_2d#x1B[39;49;00m(dtype) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
values = xr.DataArray(#x1B[90m#x1B[39;49;00m
[[#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mbb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcccc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m], [#x1B[33m"#x1B[39;49;00m#x1B[33mddddd#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33meeee#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mfff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m]],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mY#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
targ_blank_x = xr.DataArray(#x1B[90m#x1B[39;49;00m
[#x1B[33m"#x1B[39;49;00m#x1B[33maddddd#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mbbeeee#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mccccfff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mY#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
targ_space_x = xr.DataArray(#x1B[90m#x1B[39;49;00m
[#x1B[33m"#x1B[39;49;00m#x1B[33ma ddddd#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mbb eeee#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mcccc fff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mY#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
targ_blank_y = xr.DataArray(#x1B[90m#x1B[39;49;00m
[#x1B[33m"#x1B[39;49;00m#x1B[33mabbcccc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mdddddeeeefff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
targ_space_y = xr.DataArray(#x1B[90m#x1B[39;49;00m
[#x1B[33m"#x1B[39;49;00m#x1B[33ma bb cccc#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33mddddd eeee fff#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
dims=[#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m],#x1B[90m#x1B[39;49;00m
).astype(dtype)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> res_blank_x = values.str.join(dim=#x1B[33m"#x1B[39;49;00m#x1B[33mX#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_accessor_str.py#x1B[0m:3512:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\accessor_str.py#x1B[0m:575: in join
#x1B[0mdimshifted = #x1B[96mlist#x1B[39;49;00m(#x1B[96mself#x1B[39;49;00m._obj.transpose(dim, ...))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:3164: in transpose
#x1B[0mvariable = #x1B[96mself#x1B[39;49;00m.variable.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('X', 'Y'), dims_all = ('X', 'Y'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_array_api
github-actions / Test Results
All 10 runs failed: test_broadcast (xarray.tests.test_array_api)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
arrays = (<xarray.DataArray (x: 2, y: 3)> Size: 48B
array([[ 1., 2., 3.],
[ 4., 5., nan]])
Coordinates:
* x ...nan]], dtype=array_api_strict.float64)
Coordinates:
* x (x) int64 16B 10 20
Dimensions without coordinates: y)
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_broadcast#x1B[39;49;00m(arrays: #x1B[96mtuple#x1B[39;49;00m[xr.DataArray, xr.DataArray]) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
np_arr, xp_arr = arrays#x1B[90m#x1B[39;49;00m
np_arr2 = xr.DataArray(np.array([#x1B[94m1.0#x1B[39;49;00m, #x1B[94m2.0#x1B[39;49;00m]), dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
xp_arr2 = xr.DataArray(xp.asarray([#x1B[94m1.0#x1B[39;49;00m, #x1B[94m2.0#x1B[39;49;00m]), dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> expected = xr.broadcast(np_arr, np_arr2)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_array_api.py#x1B[0m:74:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\structure\alignment.py#x1B[0m:1300: in broadcast
#x1B[0mresult = [_broadcast_helper(arg, exclude, dims_map, common_coords) #x1B[94mfor#x1B[39;49;00m arg #x1B[95min#x1B[39;49;00m args]#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\structure\alignment.py#x1B[0m:1300: in <listcomp>
#x1B[0mresult = [_broadcast_helper(arg, exclude, dims_map, common_coords) #x1B[94mfor#x1B[39;49;00m arg #x1B[95min#x1B[39;49;00m args]#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\structure\alignment.py#x1B[0m:1168: in _broadcast_helper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m _broadcast_array(arg) #x1B[90m# type: ignore[return-value,unused-ignore]#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\structure\alignment.py#x1B[0m:1153: in _broadcast_array
#x1B[0mdata = _set_dims(array.variable)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\structure\alignment.py#x1B[0m:1150: in _set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m var.set_dims(var_dims_map)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x', 'y'), dims_all = ('x', 'y'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_array_api
github-actions / Test Results
All 10 runs failed: test_broadcast_during_arithmetic (xarray.tests.test_array_api)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
arrays = (<xarray.DataArray (x: 2, y: 3)> Size: 48B
array([[ 1., 2., 3.],
[ 4., 5., nan]])
Coordinates:
* x ...nan]], dtype=array_api_strict.float64)
Coordinates:
* x (x) int64 16B 10 20
Dimensions without coordinates: y)
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_broadcast_during_arithmetic#x1B[39;49;00m(arrays: #x1B[96mtuple#x1B[39;49;00m[xr.DataArray, xr.DataArray]) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
np_arr, xp_arr = arrays#x1B[90m#x1B[39;49;00m
np_arr2 = xr.DataArray(np.array([#x1B[94m1.0#x1B[39;49;00m, #x1B[94m2.0#x1B[39;49;00m]), dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
xp_arr2 = xr.DataArray(xp.asarray([#x1B[94m1.0#x1B[39;49;00m, #x1B[94m2.0#x1B[39;49;00m]), dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[90m#x1B[39;49;00m
> expected = np_arr * np_arr2#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_array_api.py#x1B[0m:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\_typed_ops.py#x1B[0m:552: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:4905: in _binary_op
#x1B[0mf(#x1B[96mself#x1B[39;49;00m.variable, other_variable_or_arraylike)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\_typed_ops.py#x1B[0m:935: in __mul__
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mself#x1B[39;49;00m._binary_op(other, operator.mul)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:2438: in _binary_op
#x1B[0mself_data, other_data, dims = _broadcast_compat_data(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:3058: in _broadcast_compat_data
#x1B[0mnew_self, new_other = _broadcast_compat_variables(#x1B[96mself#x1B[39;49;00m, other)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:3025: in _broadcast_compat_variables
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:3025: in <genexpr>
#x1B[0m#x1B[94mreturn#x1B[39;49;00m #x1B[96mtuple#x1B[39;49;00m(var.set_dims(dims) #x1B[94mif#x1B[39;49;00m var.dims != dims #x1B[94melse#x1B[39;49;00m var #x1B[94mfor#x1B[39;49;00m var #x1B[95min#x1B[39;49;00m variables)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x', 'y'), dims_all = ('y', 'x'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_array_api
github-actions / Test Results
All 10 runs failed: test_stack (xarray.tests.test_array_api)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
arrays = (<xarray.DataArray (x: 2, y: 3)> Size: 48B
array([[ 1., 2., 3.],
[ 4., 5., nan]])
Coordinates:
* x ...nan]], dtype=array_api_strict.float64)
Coordinates:
* x (x) int64 16B 10 20
Dimensions without coordinates: y)
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_stack#x1B[39;49;00m(arrays: #x1B[96mtuple#x1B[39;49;00m[xr.DataArray, xr.DataArray]) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
np_arr, xp_arr = arrays#x1B[90m#x1B[39;49;00m
> expected = np_arr.stack(z=(#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_array_api.py#x1B[0m:138:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:2986: in stack
#x1B[0mds = #x1B[96mself#x1B[39;49;00m._to_temp_dataset().stack(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:5293: in stack
#x1B[0mresult = result._stack_once(dims, new_dim, index_cls, create_index)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:5207: in _stack_once
#x1B[0mexp_var = var.set_dims(vdims, shape)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x', 'y'), dims_all = ('y', 'x'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_array_api
github-actions / Test Results
All 10 runs failed: test_unstack (xarray.tests.test_array_api)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
arrays = (<xarray.DataArray (x: 2, y: 3)> Size: 48B
array([[ 1., 2., 3.],
[ 4., 5., nan]])
Coordinates:
* x ...nan]], dtype=array_api_strict.float64)
Coordinates:
* x (x) int64 16B 10 20
Dimensions without coordinates: y)
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_unstack#x1B[39;49;00m(arrays: #x1B[96mtuple#x1B[39;49;00m[xr.DataArray, xr.DataArray]) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
np_arr, xp_arr = arrays#x1B[90m#x1B[39;49;00m
> expected = np_arr.stack(z=(#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, #x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)).unstack()#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_array_api.py#x1B[0m:147:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:2986: in stack
#x1B[0mds = #x1B[96mself#x1B[39;49;00m._to_temp_dataset().stack(#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:5293: in stack
#x1B[0mresult = result._stack_once(dims, new_dim, index_cls, create_index)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:5207: in _stack_once
#x1B[0mexp_var = var.set_dims(vdims, shape)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1489: in set_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m expanded_var.transpose(*dim)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x', 'y'), dims_all = ('y', 'x'), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_assertions
github-actions / Test Results
All 12 runs failed: test_assert_allclose[Variable] (xarray.tests.test_assertions)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
obj1 = <xarray.Variable (x: 2)> Size: 16B
array([1.e-17, 2.e+00])
obj2 = <xarray.Variable (x: 2)> Size: 16B
array([0, 3])
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33mobj1,obj2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
(#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Variable(#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), xr.Variable(#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m]), #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mVariable#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataArray([#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m], dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
xr.DataArray([#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m], dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [-#x1B[94m2e-18#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataset#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataArray(np.array(#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33m|S1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)),#x1B[90m#x1B[39;49;00m
xr.DataArray(np.array(#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33m|S1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataArray_with_character_dtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Coordinates({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]}),#x1B[90m#x1B[39;49;00m
xr.Coordinates({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m]}),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mCoordinates#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataTree.from_dict(#x1B[90m#x1B[39;49;00m
{#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33m/b#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [-#x1B[94m2e-18#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
}#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
xr.DataTree.from_dict(#x1B[90m#x1B[39;49;00m
{#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33m/b#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
}#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataTree#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_assert_allclose#x1B[39;49;00m(obj1, obj2) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m pytest.raises(#x1B[96mAssertionError#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
xr.testing.assert_allclose(obj1, obj2)#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m pytest.raises(#x1B[96mAssertionError#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
> xr.testing.assert_allclose(obj1, obj2, check_dim_order=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_assertions.py#x1B[0m:86:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\testing\assertions.py#x1B[0m:99: in _maybe_transpose_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m b.transpose(*a.dims)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\variable.py#x1B[0m:1419: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x',), dims_all = ('x',), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_assertions
github-actions / Test Results
All 12 runs failed: test_assert_allclose[DataArray] (xarray.tests.test_assertions)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
obj1 = <xarray.DataArray (x: 2)> Size: 16B
array([1.e-17, 2.e+00])
Dimensions without coordinates: x
obj2 = <xarray.DataArray (x: 2)> Size: 16B
array([0, 3])
Dimensions without coordinates: x
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33mobj1,obj2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
(#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Variable(#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), xr.Variable(#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m]), #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mVariable#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataArray([#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m], dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
xr.DataArray([#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m], dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [-#x1B[94m2e-18#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataset#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataArray(np.array(#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33m|S1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)),#x1B[90m#x1B[39;49;00m
xr.DataArray(np.array(#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33m|S1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataArray_with_character_dtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Coordinates({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]}),#x1B[90m#x1B[39;49;00m
xr.Coordinates({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m]}),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mCoordinates#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataTree.from_dict(#x1B[90m#x1B[39;49;00m
{#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33m/b#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [-#x1B[94m2e-18#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
}#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
xr.DataTree.from_dict(#x1B[90m#x1B[39;49;00m
{#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33m/b#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
}#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataTree#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_assert_allclose#x1B[39;49;00m(obj1, obj2) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m pytest.raises(#x1B[96mAssertionError#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
xr.testing.assert_allclose(obj1, obj2)#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m pytest.raises(#x1B[96mAssertionError#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
> xr.testing.assert_allclose(obj1, obj2, check_dim_order=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_assertions.py#x1B[0m:86:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\testing\assertions.py#x1B[0m:99: in _maybe_transpose_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m b.transpose(*a.dims)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataarray.py#x1B[0m:3163: in transpose
#x1B[0mdim = #x1B[96mtuple#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x',), dims_all = ('x',), missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError
Check warning on line 0 in xarray.tests.test_assertions
github-actions / Test Results
All 12 runs failed: test_assert_allclose[Dataset] (xarray.tests.test_assertions)
artifacts/Test results for OS Linux pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-min-and-scipy pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-bare-minimum pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py311-min-versions pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-dask pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-no-numba pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Linux pixi-env test-py313-with-typing pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS Windows pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py311 pytest-addopts/pytest.xml [took 0s]
artifacts/Test results for OS macOS pixi-env test-py313 pytest-addopts/pytest.xml [took 0s]
Raw output
NameError: name 'DimType' is not defined
obj1 = <xarray.Dataset> Size: 32B
Dimensions: (x: 2, y: 2)
Dimensions without coordinates: x, y
Data variables:
a (x) float64 16B 1e-17 2.0
b (y) float64 16B -2e-18 2.0
obj2 = <xarray.Dataset> Size: 32B
Dimensions: (x: 2, y: 2)
Dimensions without coordinates: x, y
Data variables:
a (x) int64 16B 0 2
b (y) int64 16B 0 1
#x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33mobj1,obj2#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
(#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Variable(#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), xr.Variable(#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m]), #x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mVariable#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataArray([#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m], dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
xr.DataArray([#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m], dims=#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataArray#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [-#x1B[94m2e-18#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataset#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataArray(np.array(#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33m|S1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)),#x1B[90m#x1B[39;49;00m
xr.DataArray(np.array(#x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, dtype=#x1B[33m"#x1B[39;49;00m#x1B[33m|S1#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataArray_with_character_dtype#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.Coordinates({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]}),#x1B[90m#x1B[39;49;00m
xr.Coordinates({#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: [#x1B[94m0#x1B[39;49;00m, #x1B[94m3#x1B[39;49;00m]}),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mCoordinates#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
pytest.param(#x1B[90m#x1B[39;49;00m
xr.DataTree.from_dict(#x1B[90m#x1B[39;49;00m
{#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33m/b#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m1e-17#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [-#x1B[94m2e-18#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
}#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
xr.DataTree.from_dict(#x1B[90m#x1B[39;49;00m
{#x1B[90m#x1B[39;49;00m
#x1B[33m"#x1B[39;49;00m#x1B[33m/b#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: xr.Dataset({#x1B[33m"#x1B[39;49;00m#x1B[33ma#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33mx#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m2#x1B[39;49;00m]), #x1B[33m"#x1B[39;49;00m#x1B[33mb#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m: (#x1B[33m"#x1B[39;49;00m#x1B[33my#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m, [#x1B[94m0#x1B[39;49;00m, #x1B[94m1#x1B[39;49;00m])}),#x1B[90m#x1B[39;49;00m
}#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
#x1B[96mid#x1B[39;49;00m=#x1B[33m"#x1B[39;49;00m#x1B[33mDataTree#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_assert_allclose#x1B[39;49;00m(obj1, obj2) -> #x1B[94mNone#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m pytest.raises(#x1B[96mAssertionError#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
xr.testing.assert_allclose(obj1, obj2)#x1B[90m#x1B[39;49;00m
#x1B[94mwith#x1B[39;49;00m pytest.raises(#x1B[96mAssertionError#x1B[39;49;00m):#x1B[90m#x1B[39;49;00m
> xr.testing.assert_allclose(obj1, obj2, check_dim_order=#x1B[94mFalse#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\tests\test_assertions.py#x1B[0m:86:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\testing\assertions.py#x1B[0m:99: in _maybe_transpose_dims
#x1B[0m#x1B[94mreturn#x1B[39;49;00m b.transpose(*a.dims)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\util\deprecation_helpers.py#x1B[0m:144: in wrapper
#x1B[0m#x1B[94mreturn#x1B[39;49;00m func(*args, **kwargs)#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\core\dataset.py#x1B[0m:6260: in transpose
#x1B[0m_ = #x1B[96mlist#x1B[39;49;00m(infix_dims(dim, #x1B[96mself#x1B[39;49;00m.dims, missing_dims))#x1B[90m#x1B[39;49;00m
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#x1B[90m#x1B[39;49;00m
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dims_supplied = ('x', 'y')
dims_all = FrozenMappingWarningOnValuesAccess({'x': 2, 'y': 2})
missing_dims = 'raise'
#x1B[0m#x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92minfix_dims#x1B[39;49;00m(#x1B[90m#x1B[39;49;00m
dims_supplied: Iterable[DimType | EllipsisType],#x1B[90m#x1B[39;49;00m
dims_all: Iterable[DimType],#x1B[90m#x1B[39;49;00m
missing_dims: ErrorHandlingWithWarn = #x1B[33m"#x1B[39;49;00m#x1B[33mraise#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
) -> Iterator[DimType]:#x1B[90m#x1B[39;49;00m
#x1B[90m #x1B[39;49;00m#x1B[33m"""#x1B[39;49;00m
#x1B[33m Resolves a supplied list containing an ellipsis representing other items, to#x1B[39;49;00m
#x1B[33m a generator with the 'realized' list of all items#x1B[39;49;00m
#x1B[33m """#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m ... #x1B[95min#x1B[39;49;00m dims_supplied:#x1B[90m#x1B[39;49;00m
dims_all_list = #x1B[96mlist#x1B[39;49;00m(dims_all)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlen#x1B[39;49;00m(#x1B[96mset#x1B[39;49;00m(dims_all)) != #x1B[96mlen#x1B[39;49;00m(dims_all_list):#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mCannot use ellipsis with repeated dims#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m #x1B[96mlist#x1B[39;49;00m(dims_supplied).count(...) > #x1B[94m1#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94mraise#x1B[39;49;00m #x1B[96mValueError#x1B[39;49;00m(#x1B[33m"#x1B[39;49;00m#x1B[33mMore than one ellipsis supplied#x1B[39;49;00m#x1B[33m"#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
other_dims = [d #x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m dims_all #x1B[94mif#x1B[39;49;00m d #x1B[95mnot#x1B[39;49;00m #x1B[95min#x1B[39;49;00m dims_supplied]#x1B[90m#x1B[39;49;00m
existing_dims = drop_missing_dims(dims_supplied, dims_all, missing_dims)#x1B[90m#x1B[39;49;00m
#x1B[94mfor#x1B[39;49;00m d #x1B[95min#x1B[39;49;00m existing_dims:#x1B[90m#x1B[39;49;00m
#x1B[94mif#x1B[39;49;00m d #x1B[95mis#x1B[39;49;00m ...:#x1B[90m#x1B[39;49;00m
#x1B[94myield from#x1B[39;49;00m other_dims#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
#x1B[94myield#x1B[39;49;00m d#x1B[90m#x1B[39;49;00m
#x1B[94melse#x1B[39;49;00m:#x1B[90m#x1B[39;49;00m
existing_dims = cast(#x1B[90m#x1B[39;49;00m
> #x1B[96mtuple#x1B[39;49;00m[DimType, ...],#x1B[90m#x1B[39;49;00m
^^^^^^^#x1B[90m#x1B[39;49;00m
drop_missing_dims(dims_supplied, dims_all, missing_dims),#x1B[90m#x1B[39;49;00m
)#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE NameError: name 'DimType' is not defined#x1B[0m
#x1B[1m#x1B[31mD:\a\xarray\xarray\xarray\namedarray\utils.py#x1B[0m:172: NameError