Skip to content

Commit aad8b1b

Browse files
hmaarrfkjlaine
authored andcommitted
Remove unecessary clip in numpy example
By the time you got to that line, the number is already a uint8, and cannot take any values outside of 0, 255.
1 parent ee1d6f6 commit aad8b1b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

examples/numpy/generate_video.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
img[:, :, 2] = 0.5 + 0.5 * np.sin(2 * np.pi * (2 / 3 + frame_i / total_frames))
2323

2424
img = np.round(255 * img).astype(np.uint8)
25-
img = np.clip(img, 0, 255)
2625

2726
frame = av.VideoFrame.from_ndarray(img, format="rgb24")
2827
for packet in stream.encode(frame):

0 commit comments

Comments
 (0)