[ 
https://issues.apache.org/jira/browse/ARROW-2741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17659767#comment-17659767
 ] 

Rok Mihevc commented on ARROW-2741:
-----------------------------------

This issue has been migrated to [issue 
#15736|https://github.com/apache/arrow/issues/15736] on GitHub. Please see the 
[migration documentation|https://github.com/apache/arrow/issues/14542] for 
further details.

> [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 Korn
>            Assignee: Uwe Korn
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.10.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {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
(v8.20.10#820010)

Reply via email to