diff --git a/src/datasets/features/pdf.py b/src/datasets/features/pdf.py index b3e3e30bd67..4d93b6af14c 100644 --- a/src/datasets/features/pdf.py +++ b/src/datasets/features/pdf.py @@ -241,13 +241,4 @@ def cast_storage(self, storage: Union[pa.StringArray, pa.StructArray, pa.ListArr else: path_array = pa.array([None] * len(storage), type=pa.string()) storage = pa.StructArray.from_arrays([bytes_array, path_array], ["bytes", "path"], mask=storage.is_null()) - # elif pa.types.is_list(storage.type): - # bytes_array = pa.array( - # [encode_np_array(np.array(arr))["bytes"] if arr is not None else None for arr in storage.to_pylist()], - # type=pa.binary(), - # ) - # path_array = pa.array([None] * len(storage), type=pa.string()) - # storage = pa.StructArray.from_arrays( - # [bytes_array, path_array], ["bytes", "path"], mask=bytes_array.is_null() - # ) return array_cast(storage, self.pa_type)