我将通过this教程来学习一些关于datashader和bokeh的知识。
除了少数几个例子之外,大部分似乎都很好。例如,下面的代码:
%%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发布于 2019-01-22 02:34:19
这听起来像是你遇到了this bug,这是固定在数据着色器主机上,并将包括在下一个版本(Datashader0.7)。同时,你可以将Numba降级到0.38.1,这应该可以避免这个问题。
https://stackoverflow.com/questions/54293881
复制相似问题