Skip to content

Commit eae4cd5

Browse files
Fix for Python 3
1 parent 63372d0 commit eae4cd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

metric_learn/lmnn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ def _count_edges(act1, act2, impostors, targets):
216216
imp = impostors[1,act2]
217217
c.update(zip(imp, targets[imp]))
218218
if c:
219-
active_pairs = np.array(c.keys())
219+
active_pairs = np.array(list(c.keys()))
220220
else:
221221
active_pairs = np.empty((0,2), dtype=int)
222-
return active_pairs, np.array(c.values())
222+
return active_pairs, np.array(list(c.values()))
223223

224224

225225
def _sum_outer_products(data, a_inds, b_inds, weights=None):

0 commit comments

Comments
 (0)