Skip to content

Commit 4927dd0

Browse files
committed
include the success output
1 parent 7b0c82d commit 4927dd0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stochman/manifold.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,13 @@ def logmap(self, p0, p1, curve: Optional[BasicCurve] = None, optimize=True):
363363
is the geodesic distance from p0 to p1.
364364
"""
365365
if curve is None:
366-
curve = self.connecting_geodesic(p0, p1)
366+
curve, _ = self.connecting_geodesic(p0, p1)
367367
if curve is not None and optimize:
368-
curve = self.connecting_geodesic(p0, p1, init_curve=curve)
368+
curve, _ = self.connecting_geodesic(p0, p1, init_curve=curve)
369369
with torch.no_grad():
370370
lm = curve.deriv(torch.zeros(1))
371+
if lm.ndim == 3:
372+
lm.squeeze_(1)
371373
return lm
372374

373375
def expmap(self, p, v):

0 commit comments

Comments
 (0)