Skip to content

Commit 03dc330

Browse files
jenshnielsenstory645
authored andcommitted
Feedback from review
1 parent 93d0f06 commit 03dc330

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/mlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,7 +2387,7 @@ def rec_append_fields(rec, names, arrs, dtypes=None):
23872387
raise ValueError("dtypes must be None, a single dtype or a list")
23882388
old_dtypes = rec.dtype.descr
23892389
if six.PY2:
2390-
old_dtypes = [(a[0].encode('utf-8'), a[1]) for a in old_dtypes]
2390+
old_dtypes = [(name.encode('utf-8'), dt) for name, dt in old_dtypes]
23912391
newdtype = np.dtype(old_dtypes + list(zip(names, dtypes)))
23922392
newrec = np.recarray(rec.shape, dtype=newdtype)
23932393
for field in rec.dtype.fields:
@@ -2598,7 +2598,7 @@ def mapped_r2field(name):
25982598
if desc[0] not in key]
25992599
all_dtypes = keydesc + r1desc + r2desc
26002600
if six.PY2:
2601-
all_dtypes = [(a[0].encode('utf-8'), a[1]) for a in all_dtypes]
2601+
all_dtypes = [(name.encode('utf-8'), dt) for name, dt in all_dtypes]
26022602
newdtype = np.dtype(all_dtypes)
26032603
newrec = np.recarray((common_len + left_len + right_len,), dtype=newdtype)
26042604

0 commit comments

Comments
 (0)