Closed github-actions[bot] closed 2 years ago
Is that a valid syntax: xr.Dataset({"a": [["x"], [1, 2, 3]]})
, or does one need to use a tuple?
It seems to use the full list as data and then fails because it is inhomogeneous.
Why does this only fail in upstream?
It warns on the release version:
/Users/dcherian/mambaforge/envs/flox-tests/lib/python3.10/site-packages/xarray/core/variable.py:243: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
data = np.asarray(data)
Ok, then I think using a list to create a DataArray is not supported by xarray. I never noticed before, haha!
Workflow Run URL
Python 3.10 Test Summary
``` xarray/tests/test_formatting.py::test__mapping_repr_recursive: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part. xarray/tests/test_variable.py::TestVariable::test_index_0d_timedelta64: AssertionError: assert dtype('