From 5f83e01f47794196d62b12bf3f58a5adcb7483cc Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 3 Apr 2023 02:37:40 +0200 Subject: [PATCH] Migrate away from deprecated np.float 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). --- frigate/motion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/motion.py b/frigate/motion.py index 9068d79b4c..5580803a38 100644 --- a/frigate/motion.py +++ b/frigate/motion.py @@ -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(