mat: get diagonal of a matrix
Created by: buyology
as per discussion with @btracey on slack, it'd very handy to be able to extract the diagonal of a matrix for e. g. extracting the variance from a varcov matrix (cf. numpy.diag
when operating on a matrix)
possibly as a view directly on the matrix:
func (m *Dense) DiagView() SymBandDense {}
or
func (m *Dense) DiagView() Dense {}
or
func (s *SymBandDense) GetDiag(a Matrix)