mirror of
https://github.com/gonum/gonum.git
synced 2025-10-15 11:40:45 +08:00
stat: explicitly panic when calling CDF with empty x
This commit is contained in:
@@ -1396,6 +1396,16 @@ func TestCDF(t *testing.T) {
|
||||
x []float64
|
||||
weights []float64
|
||||
}{
|
||||
{
|
||||
name: "x == nil",
|
||||
kind: Empirical,
|
||||
x: nil,
|
||||
},
|
||||
{
|
||||
name: "len(x) == 0",
|
||||
kind: Empirical,
|
||||
x: []float64{},
|
||||
},
|
||||
{
|
||||
name: "len(x) != len(weights)",
|
||||
q: 1.5,
|
||||
|
Reference in New Issue
Block a user