mirror of
https://github.com/gonum/gonum.git
synced 2025-10-30 10:06:29 +08:00
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:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user