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

[Python] Inconsistent resulting type during casting in pa.array() when mask is present

    XMLWordPrintableJSON

    Details

      Description

      I would expect Int64Array type in all cases below :

      >>> pa.array([4, None, 4, None], mask=np.array([False, True, False, True]))                                                                                  
      <pyarrow.lib.Int64Array object at 0x91fad3a98> [4, null, 4,  null ]
      
      >>> pa.array([4, None, 4, 'rer'], mask=np.array([False, True, False, True]))                                                                                    
      <pyarrow.lib.Int64Array object at 0x9201f23b8> [4, null, 4,  null ]
      
      >>> pa.array([4, None, 4, 3.], mask=np.array([False, True, False, True]))                                                                                        <pyarrow.lib.DoubleArray object at 0x91fab7638> [   4,   null,   4,   null ]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wesm Wes McKinney
                Reporter:
                ArtemK Artem KOZHEVNIKOV
              • Votes:
                0 Vote for this issue
                Watchers:
                3 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
                  1h