It loads the entire dataset before doing anything (and crashes), so I was wondering if it could just skip every 10 at farthest zoom (e.g. is there a decimate function for datashader outside of hv)?
import numpy as np
import dask.array as da
import xarray as xr
from datashader import transfer_functions as tf
def sample(range_=(0.0,2.4)):
xs = da.arange(700000, dtype=np.float32)
ys = da.arange(280000, dtype=np.float32)
return xr.DataArray(
da.random.random((len(ys), len(xs)), chunks=(10000, 10000)).astype(np.float32),
coords=[('y', ys), ('x', xs)])
ds = sample(range_=(0,5))
tf.shade(ds)
Then it fails:
distributed.nanny - WARNING - Restarting worker
distributed.nanny - WARNING - Worker exceeded 95% memory budget. Restarting
distributed.nanny - WARNING - Worker exceeded 95% memory budget. Restarting
distributed.nanny - WARNING - Restarting worker
distributed.nanny - WARNING - Restarting worker
KilledWorker: ("('random_sample-astype-', 13, 11)", <WorkerState 'tcp://ip', name: 0, memory: 0, processing: 601>)