Skip to content

Commit 7716bdd

Browse files
authored
Fix upper_triangular_matrix_to_full_matrix (AtsushiSakai#704)
1 parent 48a31af commit 7716bdd

File tree

1 file changed

+1
-2
lines changed
  • SLAM/GraphBasedSLAM/graphslam

1 file changed

+1
-2
lines changed

SLAM/GraphBasedSLAM/graphslam/util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ def upper_triangular_matrix_to_full_matrix(arr, n):
6868
6969
"""
7070
triu0 = np.triu_indices(n, 0)
71-
triu1 = np.triu_indices(n, 1)
7271
tril1 = np.tril_indices(n, -1)
7372

7473
mat = np.zeros((n, n), dtype=float)
7574
mat[triu0] = arr
76-
mat[tril1] = mat[triu1]
75+
mat[tril1] = mat.T[tril1]
7776

7877
return mat

0 commit comments

Comments
 (0)