Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.13.0
-
pyarrow installed via pip, pyarrow==0.13.0
Description
when reading a tensor from from a compressed pyarrow stream, it fails with
Traceback (most recent call last): File "test.py", line 10, in <module> tensor = pa.read_tensor(in_stream) File "pyarrow/ipc.pxi", line 470, in pyarrow.lib.read_tensor File "pyarrow/io.pxi", line 153, in pyarrow.lib.NativeFile.get_random_access_file File "pyarrow/io.pxi", line 182, in pyarrow.lib.NativeFile._assert_seekable OSError: only valid on seekable files
example code:
import pyarrow as pa import numpy as np a = np.random.random(size = (100,110,3) ) out_stream = pa.output_stream('test.pa', compression='gzip', buffer_size=None) pa.write_tensor(pa.Tensor.from_numpy(a), out_stream) in_stream = pa.input_stream('test.pa', compression='gzip', buffer_size=None) tensor = pa.read_tensor(in_stream) b = pa.Tensor.to_numpy(tensor)
Attachments
Issue Links
- links to