8000 Feedback from review · matplotlib/matplotlib@b926d50 · GitHub
[go: up one dir, main page]

Skip to content

Commit b926d50

Browse files
committed
Feedback from review
1 parent 90d6bac commit b926d50

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
@@ -2389,7 +2389,7 @@ def rec_append_fields(rec, names, arrs, dtypes=None):
23892389
raise ValueError("dtypes must be None, a single dtype or a list")
23902390
old_dtypes = rec.dtype.descr
23912391
if six.PY2:
2392-
old_dtypes = [(a[0].encode('utf-8'), a[1]) for a in old_dtypes]
2392+
old_dtypes = [(name.encode('utf-8'), dt) for name, dt in old_dtypes]
23932393
newdtype = np.dtype(old_dtypes + list(zip(names, dtypes)))
23942394
newrec = np.recarray(rec.shape, dtype=newdtype)
23952395
for field in rec.dtype.fields:
@@ -2600,7 +2600,7 @@ def mapped_r2field(name):
26002600
if desc[0] not in key]
26012601
all_dtypes = keydesc + r1desc + r2desc
26022602
if six.PY2:
2603-
all_dtypes = [(a[0].encode('utf-8'), a[1]) for a in all_dtypes]
2603+
all_dtypes = [(name.encode('utf-8'), dt) for name, dt in all_dtypes]
26042604
newdtype = np.dtype(all_dtypes)
26052605
newrec = np.recarray((common_len + left_len + right_len,), dtype=newdtype)
26062606

0 commit comments

Comments
 (0)
0