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

Commit33e95c5

Browse files
committed
Merge pull request#3111 from montefra/mlab_bug
bug fix: check the type of the 'key' of the two array 'r1' and 'r2'
2 parentsba72279 +590eeb8 commit33e95c5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎lib/matplotlib/mlab.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,8 +2631,11 @@ def key_desc(name):
26312631
ifdt1.type!=np.string_:
26322632
return (name,dt1.descr[0][1])
26332633

2634-
dt2=r1.dtype[name]
2635-
assertdt2==dt1
2634+
dt2=r2.dtype[name]
2635+
ifdt1!=dt2:
2636+
msg="The '{}' fields in arrays 'r1' and 'r2' must have the same"
2637+
msg+=" dtype."
2638+
raiseValueError(msg.format(name))
26362639
ifdt1.num>dt2.num:
26372640
return (name,dt1.descr[0][1])
26382641
else:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp