mirror of
				https://github.com/gonum/gonum.git
				synced 2025-11-01 02:52:49 +08:00 
			
		
		
		
	Add tests for cross entropy's panic
This commit is contained in:
		| @@ -193,6 +193,10 @@ func TestCrossEntropy(t *testing.T) { | ||||
| 			t.Errorf("Cross entropy mismatch case %d: Expected %v, Found %v", i, test.ans, c) | ||||
| 		} | ||||
| 	} | ||||
| 	if !Panics(func() { CrossEntropy(make([]float64, 3), make([]float64, 2)) }) { | ||||
| 		t.Errorf("CrossEntropy did not panic with p, q length mismatch") | ||||
| 	} | ||||
|  | ||||
| } | ||||
|  | ||||
| func ExampleEntropy() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jonathan J Lawlor
					Jonathan J Lawlor