Skip to content

Commit b958638

Browse files
committed
1 parent 6ad9331 commit b958638

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
@@ -206,8 +206,8 @@ def _find_impostors(self, furthest_neighbors):
206206
tmp = np.ravel_multi_index((i,j), shape)
207207
i,j = np.unravel_index(np.unique(tmp), shape)
208208
impostors.append(np.vstack((in_inds[j], out_inds[i])))
209-
if not impostors:
210-
"""No imposters detected"""
209+
if impostors.size == 0:
210+
"""No impostors detected"""
211211
return []
212212
return np.hstack(impostors)
213213

0 commit comments

Comments
 (0)