I need create upper triangular matrix given a set of values(the order is not importation). The matrix could be too large to input manually. np.triu
only gives you the upper triangular of a existing matrix, not creating a new one.
I am doing some optimization to get the parameters of upper triangular cholesky root of covariance matrix. My parameters are upper triangular cholesky roots of some covariance matrix. To initializing, I need to put the parameter values in the position of upper triangular.
array([[ a, b, c],
[ 0, d, e],
[ 0, 0, f]])