More PYUP fixes (#38883)

More pyup fixes

Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
Yuanyuan Chen
2025-06-18 21:38:08 +08:00
committed by GitHub
parent 12d4c5b66f
commit 1fc67a25c6
150 changed files with 273 additions and 355 deletions

View File

@@ -45,7 +45,7 @@ if is_vision_available():
def get_random_video(height, width, num_frames=8, return_torch=False):
random_frame = np.random.randint(0, 256, (height, width, 3), dtype=np.uint8)
video = np.array(([random_frame] * num_frames))
video = np.array([random_frame] * num_frames)
if return_torch:
# move channel first
return torch.from_numpy(video).permute(0, 3, 1, 2)