Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrine committed Mar 2, 2019
1 parent 10b4c84 commit 7fc3669
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion geoopt/manifolds/euclidean.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ def _transp2y(self, x, v, *more, y):
def _logmap(self, x, y):
return y - x

def _dist(self, x, y):
def _dist(self, x, y, keepdim):
return (x - y).abs()
2 changes: 1 addition & 1 deletion geoopt/manifolds/sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _expmap_transp(self, x, v, *more, u, t):

def _logmap(self, x, y):
u = self._proju(x, y - x)
dist = self._dist(x, y).unsqueeze(-1)
dist = self._dist(x, y, keepdim=True)
# If the two points are "far apart", correct the norm.
cond = dist.gt(1e-6)
return torch.where(cond, u * dist / u.norm(dim=-1, keepdim=True), u)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_manifold.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def t(request):
],
)
def manifold(request, retraction_order):
if not issubclass(request.param, geoopt.manifolds.PoincareBall):
pytest.skip(".")
man = request.param()
try:
return man.set_default_order(retraction_order)
Expand Down

0 comments on commit 7fc3669

Please sign in to comment.