我正在阅读本教程以了解有关数据着色器和散景的一些知识。
大部分似乎都很好,除了几个例子。例如,这段代码:
%%opts Nodes (size=5)
graph = layout_nodes(hv.Graph(edges_df), layout=forceatlas2_layout)
forceatlas = bundle_graph(graph, split=False)
pad = dict(x=(-.5, 1.3), y=(-.5, 1.3))
datashade(forceatlas, width=800, height=800, cmap=fire[128:]) * forceatlas.nodes.redim.range(**pad)
产生以下错误:
1 graph = layout_nodes(hv.Graph(edges_df), layout=forceatlas2_layout)
----> 2 forceatlas = bundle_graph(graph, split=False)
3 pad = dict(x=(-.5, 1.3), y=(-.5, 1.3))
4 datashade(forceatlas, width=800, height=800, cmap=fire[128:]) * forceatlas.nodes.redim.range(**pad)
...
493 for i in range(10):
494 for batch in edge_segments:
--> 495 smooth(batch, p.tension, segment_class.idx, segment_class.idy)
496
497 # Flatten things
TypeError: can't unbox heterogeneous list