mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2025-01-26 08:38:32 +00:00
Fix type compatibility for Minkowski distance
This commit is contained in:
parent
c4f0d1e3b0
commit
a61704501d
@ -43,6 +43,6 @@ class Minkowski implements Distance
|
|||||||
$distance += pow(abs($a[$i] - $b[$i]), $this->lambda);
|
$distance += pow(abs($a[$i] - $b[$i]), $this->lambda);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pow($distance, 1 / $this->lambda);
|
return (float)pow($distance, 1 / $this->lambda);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user