mirror of
https://github.com/gonum/gonum.git
synced 2025-10-27 09:11:08 +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:
@@ -13,7 +13,7 @@ func (s *S) TestQRD(c *check.C) {
|
||||
a *Dense
|
||||
}{
|
||||
{
|
||||
a: mustDense(NewDense(4, 3, []float64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12})),
|
||||
a: NewDense(4, 3, []float64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}),
|
||||
},
|
||||
} {
|
||||
qf := QR(DenseCopyOf(t.a))
|
||||
|
||||
Reference in New Issue
Block a user