@@ -16,7 +16,7 @@ def calc_stats(data):
16
16
"""
17
17
Calculate statistics for use in violin plot.
18
18
"""
19
- x = np .asarray (data , np . float )
19
+ x = np .asarray (data , float )
20
20
vals_min = np .min (x )
21
21
vals_max = np .max (x )
22
22
q2 = np .percentile (x , 50 , interpolation = "linear" )
@@ -160,7 +160,7 @@ def violinplot(vals, fillcolor="#1f77b4", rugplot=True):
160
160
"""
161
161
Refer to FigureFactory.create_violin() for docstring.
162
162
"""
163
- vals = np .asarray (vals , np . float )
163
+ vals = np .asarray (vals , float )
164
164
# summary statistics
165
165
vals_min = calc_stats (vals )["min" ]
166
166
vals_max = calc_stats (vals )["max" ]
@@ -231,7 +231,7 @@ def violin_no_colorscale(
231
231
)
232
232
color_index = 0
233
233
for k , gr in enumerate (group_name ):
234
- vals = np .asarray (gb .get_group (gr )[data_header ], np . float )
234
+ vals = np .asarray (gb .get_group (gr )[data_header ], float )
235
235
if color_index >= len (colors ):
236
236
color_index = 0
237
237
plot_data , plot_xrange = violinplot (
@@ -319,7 +319,7 @@ def violin_colorscale(
319
319
min_value = min (group_stats_values )
320
320
321
321
for k , gr in enumerate (group_name ):
322
- vals = np .asarray (gb .get_group (gr )[data_header ], np . float )
322
+ vals = np .asarray (gb .get_group (gr )[data_header ], float )
323
323
324
324
# find intermediate color from colorscale
325
325
intermed = (group_stats [gr ] - min_value ) / (max_value - min_value )
@@ -411,7 +411,7 @@ def violin_dict(
411
411
)
412
412
413
413
for k , gr in enumerate (group_name ):
414
- vals = np .asarray (gb .get_group (gr )[data_header ], np . float )
414
+ vals = np .asarray (gb .get_group (gr )[data_header ], float )
415
415
plot_data , plot_xrange = violinplot (vals , fillcolor = colors [gr ], rugplot = rugplot )
416
416
layout = graph_objs .Layout ()
417
417
0 commit comments