【发布时间】:2023-03-13 06:26:01
【问题描述】:
我正在阅读this 教程以了解一些关于数据着色器和散景的知识。
除了少数例子外,大部分似乎都很好。例如这段代码:
%%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
【问题讨论】:
标签: python bokeh holoviews datashader