p2: return nil slice on err
This commit is contained in:
parent
129f33c9a6
commit
67a9d55311
@ -66,7 +66,7 @@ func AutocorrelateMP(f []float64, maxShift float64) []float64 {
|
||||
func MutCorrelate(f1, f2 []float64, maxShift float64) ([]float64, error) {
|
||||
fLen := len(f1)
|
||||
if fLen != len(f2) {
|
||||
return []float64{}, errors.New("arrays passed are of different lengths")
|
||||
return nil, errors.New("arrays passed are of different lengths")
|
||||
}
|
||||
|
||||
m := float64(fLen) * maxShift
|
||||
|
Loading…
Reference in New Issue
Block a user