We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 591995f commit 0ff2e69Copy full SHA for 0ff2e69
src/torchcodec/decoders/_core/ops.py
@@ -9,7 +9,7 @@
9
import json
10
import warnings
11
from types import ModuleType
12
-from typing import List, Optional, Tuple
+from typing import List, Optional, Tuple, Union
13
14
import torch
15
from torch.library import get_ctx, register_fake
@@ -137,7 +137,7 @@ def create_from_bytes(
137
138
139
def create_from_file_like(
140
- file_like: io.RawIOBase | io.BytesIO, seek_mode: Optional[str] = None
+ file_like: Union[io.RawIOBase, io.BytesIO], seek_mode: Optional[str] = None
141
) -> torch.Tensor:
142
assert _pybind_ops is not None
143
return _convert_to_tensor(_pybind_ops.create_from_file_like(file_like, seek_mode))
0 commit comments