Код: Выделить всё
import xarray as xr
# open the file
ds = xr.open_rasterio('file.tif')
# modify here
.....
# this part uses too much memory and gives me the problem
ds.rio.to_raster('output.tif')
Подробнее здесь: https://stackoverflow.com/questions/711 ... ram-memory