def __call__(self, e1, e2=None, axis=1, **kwargs):
x1 = _orange_to_numpy(e1)
x2 = _orange_to_numpy(e2)
if axis == 0:
x1 = x1.T
if x2 is not None:
x2 = x2.T
if not sparse.issparse(x1):
x1 = np.atleast_2d(x1)
if e2 is not None and not sparse.issparse(x2):
x2 = np.atleast_2d(x2)
dist = metrics.pairwise.pairwise_distances(x1, x2, metric=self.metric, **kwargs)
if isinstance(e1, data.Table) or isinstance(e1, data.RowInstance):
dist = DistMatrix(dist, e1, e2)
else:
dist = DistMatrix(dist)
return dist
class SklMahalanobis(SklDistance):