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

[Python] Conversion from Numpy object array to varsize binary unimplemented

    XMLWordPrintableJSON

    Details

      Description

      >>> arr = np.array([b'xx'], dtype=np.object)
      >>> pa.array(arr, type=pa.binary(2))
      <pyarrow.lib.FixedSizeBinaryArray object at 0x7fe1ecaefa98>
      [
        b'xx'
      ]
      >>> pa.array(arr, type=pa.binary())
      Traceback (most recent call last):
        File "<ipython-input-12-e40948b94b33>", line 1, in <module>
          pa.array(arr, type=pa.binary())
        File "array.pxi", line 177, in pyarrow.lib.array
        File "error.pxi", line 77, in pyarrow.lib.check_status
        File "error.pxi", line 85, in pyarrow.lib.check_status
      ArrowNotImplementedError: /home/antoine/arrow/cpp/src/arrow/python/numpy_to_arrow.cc:1585 code: converter.Convert()
      /home/antoine/arrow/cpp/src/arrow/python/numpy_to_arrow.cc:1098 code: compute::Cast(&context, *arr, type_, options, &casted)
      /home/antoine/arrow/cpp/src/arrow/compute/kernels/cast.cc:1022 code: Cast(ctx, Datum(array.data()), out_type, options, &datum_out)
      /home/antoine/arrow/cpp/src/arrow/compute/kernels/cast.cc:1009 code: GetCastFunction(*value.type(), out_type, options, &func)
      No cast implemented from binary to binary
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bryanc Bryan Cutler
                Reporter:
                apitrou Antoine Pitrou
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: