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

Commit728106a

Browse files
committed
MNT: add error check if not a number
1 parentd1999b2 commit728106a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎lib/matplotlib/axes/_axes.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3925,7 +3925,10 @@ def dopatch(xs, ys, **kwargs):
39253925
positions=list(range(1,N+1))
39263926
eliflen(positions)!=N:
39273927
raiseValueError(datashape_message.format("positions"))
3928+
39283929
positions=np.array(positions)
3930+
iflen(positions)>0andnotisinstance(positions[0],Number):
3931+
raiseTypeError("positions should be an iterable of numbers")
39293932

39303933
# width
39313934
ifwidthsisNone:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp