You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear xarray team,
problem : rasterio xarray's backend doesn't support complex_int16 dtype.
cmd : xarray.open_rasterio(tiff)
error :
---->4xarray.open_rasterio(tiff)
/home1/datawork/agrouaze/conda_envs2/envs/xsar_gdal3.3_v2/lib/python3.8/site-packages/xarray/backends/rasterio_.pyinopen_rasterio(filename, parse_coordinates, chunks, cache, lock)
371attrs[k] =v372-->373data=indexing.LazilyIndexedArray(RasterioArrayWrapper(manager, lock, vrt_params))
374375# this lets you write arrays loaded with rasterio/home1/datawork/agrouaze/conda_envs2/envs/xsar_gdal3.3_v2/lib/python3.8/site-packages/xarray/backends/rasterio_.pyin__init__(self, manager, lock, vrt_params)
40ifnotnp.all(np.asarray(dtypes) ==dtypes[0]):
41raiseValueError("All bands should have the same dtype")
--->42self._dtype=np.dtype(dtypes[0])
4344 @propertyTypeError: data type 'complex_int16'notunderstood
Thanks for the report, @Grouny. That seems like a simple fix so I think we would welcome a PR.
However, keep in mind that we are currently considering the deprecation of the builtin "rasterio" backend (along with the open_rasterio function) in favor of the one provided by rioxarray (see #4697). There's already a PR to fix this issue: corteva/rioxarray#353
Dear xarray team,
problem :
rasterio
xarray's backend doesn't supportcomplex_int16
dtype.cmd :
xarray.open_rasterio(tiff)
error :
versions :
rasterio == 1.2.4
gdal == 3.3.0
numpy == 1.20.4
xarray == 0.18.2
system : Linux Ubuntu 16.04.7
Python 3.8.10
possible patch in
xarray/backends/rasterio_.py
line 42:Thanks for your help!
The text was updated successfully, but these errors were encountered: