Class: Arrow::RawTensorConverter

Inherits:
Object
  • Object
show all
Defined in:
lib/arrow/raw-tensor-converter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_tensor, data_type: nil, shape: nil, strides: nil, dimension_names: nil) ⇒ RawTensorConverter

Returns a new instance of RawTensorConverter.



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/arrow/raw-tensor-converter.rb', line 25

def initialize(raw_tensor,
               data_type: nil,
               shape: nil,
               strides: nil,
               dimension_names: nil)
  @raw_tensor = raw_tensor
  @data_type = data_type
  @data = nil
  @shape = shape
  @strides = strides
  @dimension_names = dimension_names
  convert
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



21
22
23
# File 'lib/arrow/raw-tensor-converter.rb', line 21

def data
  @data
end

#data_typeObject (readonly)

Returns the value of attribute data_type.



20
21
22
# File 'lib/arrow/raw-tensor-converter.rb', line 20

def data_type
  @data_type
end

#dimension_namesObject (readonly)

Returns the value of attribute dimension_names.



24
25
26
# File 'lib/arrow/raw-tensor-converter.rb', line 24

def dimension_names
  @dimension_names
end

#shapeObject (readonly)

Returns the value of attribute shape.



22
23
24
# File 'lib/arrow/raw-tensor-converter.rb', line 22

def shape
  @shape
end

#stridesObject (readonly)

Returns the value of attribute strides.



23
24
25
# File 'lib/arrow/raw-tensor-converter.rb', line 23

def strides
  @strides
end