osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (ARROW-2741) [Python] pa.array from np.datetime[D] and type=pa.date64 produces invalid results


Uwe L. Korn created ARROW-2741:
----------------------------------

             Summary: [Python] pa.array from np.datetime[D] and type=pa.date64 produces invalid results
                 Key: ARROW-2741
                 URL: https://issues.apache.org/jira/browse/ARROW-2741
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
    Affects Versions: 0.9.0
            Reporter: Uwe L. Korn
             Fix For: 0.10.0


{code}
In [1]: import pyarrow as pa

In [2]: import numpy as np

In [3]: pa.array(np.array(['2015-01-01', '2015-01-01'], dtype='datetime64[D]'))
Out[3]:
<pyarrow.lib.Date32Array object at 0x11571bae8>
[
  datetime.date(2015, 1, 1),
  datetime.date(2015, 1, 1)
]

In [4]: pa.array(np.array(['2015-01-01', '2015-01-01'], dtype='datetime64[D]'), type=pa.date64())
Out[4]:
<pyarrow.lib.Date64Array object at 0x10965d138>
[
  datetime.date(2015, 1, 1),
  datetime.date(1970, 1, 1)
]
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)