You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/06/25 21:09:01 UTC

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

     [ https://issues.apache.org/jira/browse/ARROW-2741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated ARROW-2741:
----------------------------------
    Labels: pull-request-available  (was: )

> [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
>            Priority: Major
>              Labels: pull-request-available
>             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)