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

[Python] Array dtype inference incorrect when created from list of mixed numpy scalars

    XMLWordPrintableJSON

    Details

      Description

      Minimal reproducer:

      import pyarrow as pa
      import numpy as np
      
      test_list = [np.dtype('int32').type(10), np.dtype('float32').type(0.5)]
      test_array = pa.array(test_list)
      
      # Expected
      # test_array
      # <pyarrow.lib.DoubleArray object at 0x7f009963bf48>
      # [
      #   10,
      #   0.5
      # ]
      
      # Got
      # test_array
      # <pyarrow.lib.Int32Array object at 0x7f009963bf48>
      # [
      #   10,
      #   0
      # ]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wesm Wes McKinney
                Reporter:
                keith.j.kraus Keith Kraus
              • Votes:
                0 Vote for this issue
                Watchers:
                4 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 - 1h 40m
                  1h 40m