Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/matplotlib/mlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -2631,8 +2631,11 @@ def key_desc(name):
if dt1.type != np.string_:
return (name, dt1.descr[0][1])

dt2 = r1.dtype[name]
assert dt2==dt1
dt2 = r2.dtype[name]
if dt1 != dt2:
msg = "The type of the '{}' in the arrays 'r1' and 'r2' must be of"
msg += " the same type"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or "The '{}' fields in arrays 'r1' and 'r2' must have the same dtype." Right?

raise ValueError(msg.format(name))
if dt1.num>dt2.num:
return (name, dt1.descr[0][1])
else:
Expand Down