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

Convert multi dimensional numpy array to pyarrow array

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0, 3.0.0
    • None
    • Python
    • None

    Description

      data = np.zeros((10,8), dtype=np.uint8)
      out = pa.array(list(data))
      out.type # ListType(list<item: uint8>)

      data = np.zeros((3,4,6), dtype=np.uint8)
      out = pa.array(list(data)) # Throws error ArrowInvalid: Can only convert 1-dimensional array values

      Even though it's working on 2D numpy arrays perfectly, it doesn't work on N-Dimensional numpy arrays (where N > 2). Is possible to extend the current feature forĀ inner elements with dimension greater than 1?

      Attachments

        Activity

          People

            Unassigned Unassigned
            bhavitvyamalik Bhavitvya Malik
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: