From 3125eac41700b2c776e22c1eba878b87c0fee41c Mon Sep 17 00:00:00 2001 From: laggykiller Date: Wed, 27 Mar 2024 19:50:10 +0800 Subject: [PATCH] Fix typing --- src/sticker_convert/converter.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/sticker_convert/converter.py b/src/sticker_convert/converter.py index d526d2b..bacbec5 100755 --- a/src/sticker_convert/converter.py +++ b/src/sticker_convert/converter.py @@ -109,11 +109,7 @@ def yuva_to_rgba(frame: "VideoFrame") -> "np.ndarray[Any, Any]": yuv_array[:, :, 1:].clip(16, 240).astype(yuv_array.dtype) - 128 # type: ignore ) - rgb_array = ( - cast("np.ndarray[Any, Any]", np.matmul(yuv_array, YUV_RGB_MATRIX.T)) - .clip(0, 255) - .astype("uint8") - ) + rgb_array = np.matmul(yuv_array, YUV_RGB_MATRIX.T).clip(0, 255).astype("uint8") return np.concatenate((rgb_array, a), axis=2)