Skip to content

Commit

Permalink
Fix upper_triangular_matrix_to_full_matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffLIrion committed Mar 16, 2022
1 parent d70618e commit e8c5c7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions graphslam/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ def upper_triangular_matrix_to_full_matrix(arr, n):
"""
triu0 = np.triu_indices(n, 0)
triu1 = np.triu_indices(n, 1)
tril1 = np.tril_indices(n, -1)

mat = np.zeros((n, n), dtype=np.float64)
mat[triu0] = arr
mat[tril1] = mat[triu1]
mat[tril1] = mat.T[tril1]

return mat

0 comments on commit e8c5c7f

Please sign in to comment.