@@ -249,30 +249,27 @@ def test_simple_streamline(self):
249249class TestDendrogram (TestCase ):
250250
251251 def test_default_dendrogram (self ):
252- dendro = tls .FigureFactory .create_dendrogram (X = np .array ([[1 , 2 , 3 , 4 ],
253- [1 , 1 , 3 , 4 ],
254- [1 , 2 , 1 , 4 ],
255- [1 , 2 , 3 , 1 ]]))
252+ X = np .array ([[1 , 2 , 3 , 4 ], [1 , 1 , 3 , 4 ], [1 , 2 , 1 , 4 ], [1 , 2 , 3 , 1 ]])
253+ dendro = tls .FigureFactory .create_dendrogram (X = X )
256254 expected_data = [{'marker' : {'color' : 'rgb(255,133,27)' },
257255 'mode' : 'lines' , 'xaxis' : 'xs' ,
258256 'yaxis' : 'y' ,
259- 'y' : np .array ([0. , 1. , 1. , 0. ]),
260- 'x' : np .array ([25. , 25. , 35. , 35. ]),
257+ 'y' : np .array ([0. , 1. , 1. , 0. ]),
258+ 'x' : np .array ([25. , 25. , 35. , 35. ]),
261259 'type' : u'scatter' },
262260 {'marker' : {'color' : 'rgb(255,133,27)' },
263261 'mode' : 'lines' ,
264262 'xaxis' : 'x' ,
265263 'yaxis' : 'y' ,
266- 'y' : np .array ([0. , 2.23606798 ,
267- 2.23606798 , 1. ]),
264+ 'y' : np .array ([0. , 2.23606798 , 2.23606798 , 1. ]),
268265 'x' : np .array ([15. , 15. , 30. , 30. ]),
269266 'type' : u'scatter' },
270267 {'marker' : {'color' : 'blue' },
271268 'mode' : 'lines' ,
272269 'xaxis' : 'x' ,
273270 'yaxis' : 'y' ,
274271 'y' : np .array ([0. , 3.60555128 ,
275- 3.60555128 , 2.23606798 ]),
272+ 3.60555128 , 2.23606798 ]),
276273 'x' : np .array ([5. , 5. , 22.5 , 22.5 ]),
277274 'type' : u'scatter' }]
278275 expected_layout = {'width' : '100%' ,
@@ -291,7 +288,7 @@ def test_default_dendrogram(self):
291288 'rangemode' : 'tozero' ,
292289 'type' : 'linear' ,
293290 'tickvals' : np .array ([5.0 , 15.0 ,
294- 25.0 , 35.0 ])},
291+ 25.0 , 35.0 ])},
295292 'yaxis' : {'showticklabels' : True ,
296293 'ticks' : 'outside' ,
297294 'showgrid' : False ,
@@ -348,7 +345,9 @@ def test_dendrogram_orientation(self):
348345 dendro_bottom = tls .FigureFactory .create_dendrogram (
349346 X , orientation = 'bottom' )
350347 self .assertEqual (len (dendro_bottom ['layout' ]['xaxis' ]['ticktext' ]), 5 )
351- tickvals_bottom = np .array (dendro_bottom ['layout' ]['xaxis' ]['tickvals' ])
348+ tickvals_bottom = np .array (
349+ dendro_bottom ['layout' ]['xaxis' ]['tickvals' ]
350+ )
352351 self .assertTrue ((tickvals_bottom >= 0 ).all ())
353352
354353 dendro_top = tls .FigureFactory .create_dendrogram (X , orientation = 'top' )
@@ -361,8 +360,8 @@ def test_dendrogram_orientation(self):
361360 [1 , 2 , 1 , 4 ],
362361 [1 , 2 , 3 , 1 ]])
363362 greyscale = [
364- 'rgb(0,0,0)' , # black
365- 'rgb(05,105,105)' , # dim grey
363+ 'rgb(0,0,0)' , # black
364+ 'rgb(05,105,105)' , # dim grey
366365 'rgb(128,128,128)' , # grey
367366 'rgb(169,169,169)' , # dark grey
368367 'rgb(192,192,192)' , # silver
0 commit comments