Unit testing for def/ module.
Added unit tests to test code in def/ module.
This commit is contained in:
parent
e24b8a08c9
commit
bac60e872a
396 changed files with 83991 additions and 13209 deletions
6
vendor/github.com/montanaflynn/stats/deviation.go
generated
vendored
6
vendor/github.com/montanaflynn/stats/deviation.go
generated
vendored
|
@ -10,7 +10,7 @@ func MedianAbsoluteDeviation(input Float64Data) (mad float64, err error) {
|
|||
// MedianAbsoluteDeviationPopulation finds the median of the absolute deviations from the population median
|
||||
func MedianAbsoluteDeviationPopulation(input Float64Data) (mad float64, err error) {
|
||||
if input.Len() == 0 {
|
||||
return math.NaN(), EmptyInput
|
||||
return math.NaN(), EmptyInputErr
|
||||
}
|
||||
|
||||
i := copyslice(input)
|
||||
|
@ -32,7 +32,7 @@ func StandardDeviation(input Float64Data) (sdev float64, err error) {
|
|||
func StandardDeviationPopulation(input Float64Data) (sdev float64, err error) {
|
||||
|
||||
if input.Len() == 0 {
|
||||
return math.NaN(), EmptyInput
|
||||
return math.NaN(), EmptyInputErr
|
||||
}
|
||||
|
||||
// Get the population variance
|
||||
|
@ -46,7 +46,7 @@ func StandardDeviationPopulation(input Float64Data) (sdev float64, err error) {
|
|||
func StandardDeviationSample(input Float64Data) (sdev float64, err error) {
|
||||
|
||||
if input.Len() == 0 {
|
||||
return math.NaN(), EmptyInput
|
||||
return math.NaN(), EmptyInputErr
|
||||
}
|
||||
|
||||
// Get the sample variance
|
||||
|
|
Reference in a new issue