dask printing in jupyter notebook

Viewed 176

I am trying to get same print output as just calling x, I tried several options:

import dask.array as da
x = da.random.random(size=(1000, 20), chunks=(20, 5))
print(str(x))
print(repr(x))
x


print(x)
print(x.__print__())
print(x.__str__())
print(str(x))
print(repr(x))

nothing works, any ideas what jupyter uses for printing? enter image description here

1 Answers

It seems that you are interested in ._repr_html_() method.

import dask.array as da
from IPython.core.display import HTML

x = da.random.random(size=(1000, 20), chunks=(20, 5))
HTML(x._repr_html_())
Related