Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2741

[Python] pa.array from np.datetime[D] and type=pa.date64 produces invalid results

    XMLWordPrintableJSON

    Details

      Description

      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)
      ]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                uwe Uwe L. Korn
                Reporter:
                uwe Uwe L. Korn
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h