mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35: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
|
||||
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]):
|
||||
self._update(distances)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user