{ r, c := m. Dims () o := NewDense ( r, c, nil ) ( m, n ) return o } Finally the addScalar function allows us to add a scalar value to each element in the matrix.
{ r, c := m. Dims () o := NewDense ( r, c, nil ) o.