Skip to content

Commit 36b852c

Browse files
Fixing error with older scipy
array.dot(sparse) was creating an object array, but sparse.dot(array) correctly makes an array.
1 parent 1667364 commit 36b852c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metric_learn/sdml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _prepare_inputs(self, X, W):
3434
else:
3535
self.M = np.identity(X.shape[1])
3636
L = laplacian(W, normed=False)
37-
self.loss_matrix = self.X.T.dot(L).dot(self.X)
37+
self.loss_matrix = self.X.T.dot(L.dot(self.X))
3838

3939
def metric(self):
4040
return self.M

0 commit comments

Comments
 (0)