mirror of
https://github.com/gonum/gonum.git
synced 2025-10-20 05:54:41 +08:00
test for chi2 special case
Add test for chi squared distance special case, with both bins == 0.
This commit is contained in:
@@ -570,6 +570,11 @@ func TestChiSquare(t *testing.T) {
|
||||
q: []float64{50, 50, 50, 50},
|
||||
res: 12.5,
|
||||
},
|
||||
{
|
||||
p: []float64{40, 60, 30, 45, 0, 0},
|
||||
q: []float64{50, 50, 50, 50, 0, 0},
|
||||
res: 12.5,
|
||||
},
|
||||
} {
|
||||
resultpq := ChiSquare(test.p, test.q)
|
||||
|
||||
|
Reference in New Issue
Block a user