Skip to content

Commit

Permalink
Fixed bokeh graph plot test
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Feb 13, 2018
1 parent 383690d commit 1eb2961
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion holoviews/core/data/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def values(cls, dataset, dim, expanded=True, flat=True):
else:
if not expanded:
return util.unique_array(values)
values = np.array(values)
values = np.asarray(values)
return values


Expand Down
4 changes: 2 additions & 2 deletions tests/testbokehgraphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def setUp(self):
self.node_info = Dataset(['Output']+['Input']*(N-1), vdims=['Label'])
self.node_info2 = Dataset(self.weights, vdims='Weight')
self.graph2 = Graph(((self.source, self.target), self.node_info))
self.graph3 = Graph(((self.source, self.target), self.node_info2), datatype=['dictionary'])
self.graph3 = Graph(((self.source, self.target), self.node_info2))
self.graph4 = Graph(((self.source, self.target, self.weights),), vdims='Weight')

def tearDown(self):
Expand Down Expand Up @@ -144,7 +144,7 @@ def test_graph_nodes_numerically_colormapped(self):
self.assertEqual(glyph.fill_color, {'field': 'Weight', 'transform': cmapper})

def test_graph_edges_categorical_colormapped(self):
g = self.graph3.opts(plot=dict(edge_color_index='start'),
g = self.graph2.opts(plot=dict(edge_color_index='start'),
style=dict(edge_cmap=['#FFFFFF', '#000000']))
plot = bokeh_renderer.get_plot(g)
cmapper = plot.handles['edge_colormapper']
Expand Down

0 comments on commit 1eb2961

Please sign in to comment.