Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit00deb04

Browse files
tacaswellQuLogic
authored andcommitted
MNT: avoid casting to numpy in violin_stats
1 parent98f22a9 commit00deb04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎lib/matplotlib/cbook/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,10 +1428,10 @@ def violin_stats(X, method, points=100, quantiles=None):
14281428
quantiles=_reshape_2D(quantiles,"quantiles")
14291429
# Else, mock quantiles if is none or empty
14301430
else:
1431-
quantiles= [[]]*np.shape(X)[0]
1431+
quantiles= [[]]*len(X)
14321432

14331433
# quantiles should has the same size as dataset
1434-
ifnp.shape(X)[:1]!=np.shape(quantiles)[:1]:
1434+
iflen(X)!=len(quantiles):
14351435
raiseValueError("List of violinplot statistics and quantiles values"
14361436
" must have the same length")
14371437

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp