parameters: (jvm_array)
return_statement: return pa.Array.from_buffers(dtype, length, buffers, null_count)
docstring: Construct an (Python) Array from its JVM equivalent.
  
      Parameters
      ----------
      jvm_array : org.apache.arrow.vector.ValueVector
  
      Returns
      -------
      array : Array
docstring_summary: Construct an (Python) Array from its JVM equivalent.
docstring_tokens: Construct an ( Python ) Array from its JVM equivalent .
function: def array(jvm_array):
      """
      Construct an (Python) Array from its JVM equivalent.
  
      Parameters
      ----------
      jvm_array : org.apache.arrow.vector.ValueVector
  
      Returns
      -------
      array : Array
      """
      if jvm_array.getField().getType().isComplex():
          minor_type_str = jvm_array.getMinorType().toString()
          raise NotImplementedError(
              "Cannot convert JVM Arrow array of type {},"
              " complex types not yet implemented.".format(minor_type_str))
      dtype = field(jvm_array.getField()).type
      buffers = [jvm_buffer(buf)
                 for buf in list(jvm_array.getBuffers(False))]
  
      # If JVM has an empty Vector, buffer list will be empty so create manually
      if len(buffers) == 0:
          return pa.array([], type=dtype)
  
      length = jvm_array.getValueCount()
      null_count = jvm_array.getNullCount()
      return pa.Array.from_buffers(dtype, length, buffers, null_count)
function_tokens: def array ( jvm_array ) : if jvm_array . getField ( ) . getType ( ) . isComplex ( ) : minor_type_str = jvm_array . getMinorType ( ) . toString ( ) raise NotImplementedError ( "Cannot convert JVM Arrow array of type {}," " complex types not yet implemented." . format ( minor_type_str ) ) dtype = field ( jvm_array . getField ( ) ) . type buffers = [ jvm_buffer ( buf ) for buf in list ( jvm_array . getBuffers ( False ) ) ] # If JVM has an empty Vector, buffer list will be empty so create manually if len ( buffers ) == 0 : return pa . array ( [ ] , type = dtype ) length = jvm_array . getValueCount ( ) null_count = jvm_array . getNullCount ( ) return pa . Array . from_buffers ( dtype , length , buffers , null_count )