Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d9b88c

Browse filesBrowse files
committed
Added a small validator
1 parent 3d6dbb9 commit 2d9b88c
Copy full SHA for 2d9b88c

File tree

1 file changed

+3
-2
lines changed
Filter options

1 file changed

+3
-2
lines changed

‎plotly/tools.py

Copy file name to clipboardExpand all lines: plotly/tools.py
+3-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.