In [1]:
name = '2017-05-12-dask-intro'
title = 'Sneak peek at dask'
tags = 'dask, parallel computing'
author = 'Denis Sergeev'
In [2]:
from nb_tools import connect_notebook_to_post
from IPython.core.display import HTML, Image
html = connect_notebook_to_post(name, title, tags, author)
In [31]:
from dask.diagnostics import ProgressBar
ProgressBar().register()
In [4]:
import dask
from dask import array as da
import numpy as np
In [49]:
arr = np.random.rand(10, 700, 600)
print(arr.nbytes* 2**(-20))
In [56]:
darr = da.from_array(arr, chunks=(1, 100, 300))
In [57]:
y = (darr ** 2).sum()
In [58]:
a = y.compute()
In [ ]: