Avoid to use closure in dense.NewMatrix.