From a9ee83bc03033af28a3166078f8471ceb2b7977a Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 27 Jun 2024 14:16:27 +0100 Subject: [PATCH] Consistent newlines --- examples/basic_example.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/basic_example.py b/examples/basic_example.py index 4c77dcc7..765e05f2 100644 --- a/examples/basic_example.py +++ b/examples/basic_example.py @@ -17,15 +17,14 @@ my_path = os.path.abspath(inspect.getfile(inspect.currentframe())) video_file_path = os.path.dirname(my_path) + "/../test/resources/nasa_13013.mp4" simple_decoder = SimpleVideoDecoder(video_file_path) + # %% # You can get the total frame count for the best video stream by calling len(). - num_frames = len(simple_decoder) print(f"{video_file_path=} has {num_frames} frames") # %% # You can get the decoded frame by using the subscript operator. - first_frame = simple_decoder[0] print(f"decoded frame has type {type(first_frame)}") @@ -33,11 +32,10 @@ # The shape of the decoded frame is (H, W, C) where H and W are the height # and width of the video frame. C is 3 because we have 3 channels red, green, # and blue. - print(f"{first_frame.shape=}") + # %% # The dtype of the decoded frame is ``torch.uint8``. - print(f"{first_frame.dtype=}") # %%