Skip to content

Commit

Permalink
Migrate away from deprecated np.float
Browse files Browse the repository at this point in the history
It is an alias for the python float type, and got deprecated in 1.20 and
was removed in 1.24. The rest of the project already uses float32
(single), so I believe this is also correct here, as opposed to float64
(double).
  • Loading branch information
mweinelt committed Apr 3, 2023
1 parent fbf2966 commit 5f83e01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frigate/motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def __init__(
config.frame_height,
config.frame_height * frame_shape[1] // frame_shape[0],
)
self.avg_frame = np.zeros(self.motion_frame_size, np.float)
self.avg_delta = np.zeros(self.motion_frame_size, np.float)
self.avg_frame = np.zeros(self.motion_frame_size, np.float32)
self.avg_delta = np.zeros(self.motion_frame_size, np.float32)
self.motion_frame_count = 0
self.frame_counter = 0
resized_mask = cv2.resize(
Expand Down

0 comments on commit 5f83e01

Please sign in to comment.