mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
Catch possible edge case in stddev calc
This commit is contained in:
parent
a8b5aebacb
commit
07d73e1123
@ -20,7 +20,7 @@ class ZScoreNormalization:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def stddev(self):
|
def stddev(self):
|
||||||
return math.sqrt(self.variance)
|
return math.sqrt(self.variance) if self.variance > 0 else 0.0
|
||||||
|
|
||||||
def normalize(self, distances: list[float]):
|
def normalize(self, distances: list[float]):
|
||||||
self._update(distances)
|
self._update(distances)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user