[ https://issues.apache.org/jira/browse/ARROW-2040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16380459#comment-16380459 ]
ASF GitHub Bot commented on ARROW-2040: --------------------------------------- wesm commented on issue #1680: ARROW-2040: [Python] Deserialized Numpy array must keep ref to underlying tensor URL: https://github.com/apache/arrow/pull/1680#issuecomment-369272242 Appveyor build here: https://ci.appveyor.com/project/pitrou/arrow/build/1.0.146. will merge once that moves along a little more ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [Python] pyarrow.read_serialized returns bogus data > --------------------------------------------------- > > Key: ARROW-2040 > URL: https://issues.apache.org/jira/browse/ARROW-2040 > Project: Apache Arrow > Issue Type: Bug > Affects Versions: 0.8.0 > Reporter: Richard Shin > Assignee: Antoine Pitrou > Priority: Major > Labels: pull-request-available > Fix For: 0.9.0 > > > pyarrow.deserialize works fine, however. > {code:python} > Python 2.7.12 (default, Nov 20 2017, 18:23:56) > [GCC 5.4.0 20160609] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import pyarrow as pa, numpy as np > >>> with open('test.pyarrow', 'w') as f: > ... f.write(pa.serialize(np.arange(10, > dtype=np.int32)).to_buffer().to_pybytes()) > ... > >>> pa.read_serialized(pa.OSFile('test.pyarrow')).deserialize() > array([54846320, 0, 45484448, 0, 4, 5, 6, 7, 8, 9], dtype=int32) > >>> pa.deserialize(pa.frombuffer(open('test.pyarrow').read())) > array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=int32) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)