mirror of
https://github.com/gonum/gonum.git
synced 2025-10-07 08:01:20 +08:00
stat/combin: allow user allocation for Cartesian product
This commit is contained in:
@@ -318,7 +318,7 @@ func TestCartesianGenerator(t *testing.T) {
|
||||
gen := NewCartesianGenerator([]int{1, 2, 3})
|
||||
iterations := 0
|
||||
for gen.Next() {
|
||||
got := gen.Product()
|
||||
got := gen.Product(nil)
|
||||
if !reflect.DeepEqual(got, want[iterations]) {
|
||||
t.Errorf("Cartesian product does not match. want: %v got: %v", want[iterations], got)
|
||||
}
|
||||
|
Reference in New Issue
Block a user