I\'m doing some computations on a full matrix that is redundant (i.e. can be a triangle matrix without losing info). I realized I can compute only the lower portion of the
Since the matrix is symetric, you can do:
m = np.array([1,1,0,1,1,1,0,1,1]).reshape((3,3))
# after some computation you get x
x = np.tril(m)
m_recomposed = x + x.transpose() - np.diag(np.diag(x))
#array([[1, 1, 0],
# [1, 1, 1],
# [0, 1, 1]])
#In [152]: np.array_equal(m, m_recomposed)
#Out[152]: True