Module: Numo::ArrowConvertable

Included in:
DFloat, Int16, Int32, Int64, Int8, SFloat, UInt16, UInt32, UInt64, UInt8
Defined in:
lib/arrow-numo-narray/to-arrow.rb

Instance Method Summary collapse

Instance Method Details

#to_arrowObject


17
18
19
20
21
22
23
24
25
26
# File 'lib/arrow-numo-narray/to-arrow.rb', line 17

def to_arrow
  data = to_binary
  tensor = Arrow::Tensor.new(arrow_data_type,
                             Arrow::Buffer.new(data),
                             shape,
                             nil,
                             nil)
  tensor.instance_variable_set(:@data, data)
  tensor
end