how to copy only upper triangular values into array from numpy.triu()?,list(A[np.triu_indices(3)])