Change NewDense signature and behaviour

This is an API breaking change.

NewDense now panics if len(mat) != r*c, unless mat == nil. When mat is
nil a new, correctly sized slice is allocated.
This commit is contained in:
kortschak
2014-01-08 09:56:39 +10:30
parent fadcd6dd7f
commit b10f3a00f3
13 changed files with 87 additions and 112 deletions

View File

@@ -14,11 +14,11 @@ func (s *S) TestCholesky(c *check.C) {
spd bool
}{
{
a: mustDense(NewDense(3, 3, []float64{
a: NewDense(3, 3, []float64{
4, 1, 1,
1, 2, 3,
1, 3, 6,
})),
}),
spd: true,
},