From 863e31fa52b837d30d38de9ba5d7e30096297b0c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 2 May 2020 03:32:00 +0300 Subject: utils: raspberrypi: ctt: Fix pycodestyle E228 E228 missing whitespace around modulo operator Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: David Plowman --- utils/raspberrypi/ctt/ctt_image_load.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'utils/raspberrypi/ctt/ctt_image_load.py') diff --git a/utils/raspberrypi/ctt/ctt_image_load.py b/utils/raspberrypi/ctt/ctt_image_load.py index 035256e3..584e0f8e 100644 --- a/utils/raspberrypi/ctt/ctt_image_load.py +++ b/utils/raspberrypi/ctt/ctt_image_load.py @@ -112,10 +112,10 @@ class Image: """ assemble 10 bit numbers """ - ch0 = np.left_shift((np.left_shift(ba0, 2) + (ba4%4)), 6) - ch1 = np.left_shift((np.left_shift(ba1, 2) + (np.right_shift(ba4, 2)%4)), 6) - ch2 = np.left_shift((np.left_shift(ba2, 2) + (np.right_shift(ba4, 4)%4)), 6) - ch3 = np.left_shift((np.left_shift(ba3, 2) + (np.right_shift(ba4, 6)%4)), 6) + ch0 = np.left_shift((np.left_shift(ba0, 2) + (ba4 % 4)), 6) + ch1 = np.left_shift((np.left_shift(ba1, 2) + (np.right_shift(ba4, 2) % 4)), 6) + ch2 = np.left_shift((np.left_shift(ba2, 2) + (np.right_shift(ba4, 4) % 4)), 6) + ch3 = np.left_shift((np.left_shift(ba3, 2) + (np.right_shift(ba4, 6) % 4)), 6) """ interleave bits """ @@ -146,8 +146,8 @@ class Image: ba0 = raw[..., 0:3*((self.w+1)>>1):3] ba1 = raw[..., 1:3*((self.w+1)>>1):3] ba2 = raw[..., 2:3*((self.w+1)>>1):3] - ch0 = np.left_shift((np.left_shift(ba0, 4) + ba2%16), 4) - ch1 = np.left_shift((np.left_shift(ba1, 4) + (np.right_shift(ba2, 4))%16), 4) + ch0 = np.left_shift((np.left_shift(ba0, 4) + ba2 % 16), 4) + ch1 = np.left_shift((np.left_shift(ba1, 4) + (np.right_shift(ba2, 4)) % 16), 4) mat = np.empty((self.h, self.w), dtype=ch0.dtype) mat[..., 0::2] = ch0 mat[..., 1::2] = ch1 -- cgit v1.2.1