Skip to content

Commit 2d9b88c

Browse files
committed
Added a small validator
1 parent 3d6dbb9 commit 2d9b88c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plotly/tools.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,6 @@ def create_streamline(x, y, u, v,
17621762
y=streamline_y + arrow_y,
17631763
mode='lines', **kwargs)
17641764

1765-
<<<<<<< HEAD
17661765
data = [streamline]
17671766
layout = graph_objs.Layout(hovermode='closest')
17681767

@@ -2290,7 +2289,9 @@ def create_dendrogram(X, orientation="bottom", labels=None,
22902289
colorscale: Optional colorscale for dendgrogram tree clusters
22912290
"""
22922291

2293-
#TODO: add validations of input
2292+
s = X.shape
2293+
if len(s) != 2:
2294+
exceptions.PlotlyError("X should be 2-dimensional array.")
22942295

22952296
dendrogram = _Dendrogram(X, orientation, labels, colorscale)
22962297
return dendrogram

0 commit comments

Comments
 (0)