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

[Python] Tensor.from_numpy doesn't support struct arrays

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 0.8.0
    • None
    • Python
    • None

    Description

      >>> dt = np.dtype([('x', np.int8), ('y', np.float32)])
      >>> dt.itemsize
      5
      >>> arr = np.arange(5*10, dtype=np.int8).view(dt)
      >>> pa.Tensor.from_numpy(arr)
      Traceback (most recent call last):
        File "<ipython-input-8-744d4c7972b7>", line 1, in <module>
          pa.Tensor.from_numpy(arr)
        File "array.pxi", line 523, in pyarrow.lib.Tensor.from_numpy
        File "error.pxi", line 85, in pyarrow.lib.check_status
      ArrowNotImplementedError: /home/antoine/arrow/cpp/src/arrow/python/numpy_convert.cc:250 code: GetTensorType(reinterpret_cast<PyObject*>(PyArray_DESCR(ndarray)), &type)
      Unsupported numpy type 20
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            apitrou Antoine Pitrou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: