Issue
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?
Solution
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_())
Answered By - SultanOrazbayev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.