Best imshow-alternative for dask?

Is there any function or package that allows me to display a dask 2D-array faster than using the following (using .compute)?

import dask
import matplotlib.pyplot as plt

arr_dask = dask.array.random.randint((400, 400))
arr_npy = arr_dask.compute()
fig, ax = plt.subplots()
ax.imshow(arr_npy)

Hey @khyll, for displaying a 2D array as an image you necessarily have to compute it. You could also pass the dask array directly to imshow without explicitly calling compute. Another possibility would be to downscale the image before visualizing it, e.g. if it doesn’t fit into memory. For the latter you could use dask.array.coarsen — Dask documentation.

Hi @m-albert,

As @m-albert says, you’ll necessary have to compute at least part of your data to display it on your main process.

But maybe you use case is a bit more complex than your example? Why do you want a faster method?

You also have some advanced Library like hvPlot and the associated ecosystem, which allows you to plot and compute only part of a big dataset.