broadcast_trick(func)
Dask arrays are currently immutable; thus when we know an array is uniform, we can replace the actual data by a single value and have all elements point to it, thus reducing the size.
>>> x = np.broadcast_to(1, (100,100,100)) >>> x.base.nbytes 8
Those array are not only more efficient locally, but dask serialisation is aware of the _real_ size of those array and thus can send them around efficiently and schedule accordingly.
Note that those array are read-only and numpy will refuse to assign to them, so should be safe.
Provide a decorator to wrap common numpy function with a broadcast trick.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them