Class: ArrowFormat::Org::Apache::Arrow::Flatbuf::TensorDim
- Inherits:
-
FlatBuffers::Table
- Object
- FlatBuffers::Table
- ArrowFormat::Org::Apache::Arrow::Flatbuf::TensorDim
- Defined in:
- lib/arrow-format/org/apache/arrow/flatbuf/tensor_dim.rb
Overview
Data structures for dense tensors Shape data for a single axis in a tensor
Constant Summary collapse
- FIELDS =
{ size: ::FlatBuffers::Field.new(:size, 0, 4, :long, 0), name: ::FlatBuffers::Field.new(:name, 1, 6, :string, 0), }
- Data =
define_data_class
Instance Method Summary collapse
-
#name ⇒ Object
Name of the dimension, optional.
-
#size ⇒ Object
Length of dimension.
Instance Method Details
#name ⇒ Object
Name of the dimension, optional
26 27 28 29 30 31 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/tensor_dim.rb', line 26 def name field_offset = @view.unpack_virtual_offset(6) return nil if field_offset.zero? @view.unpack_string(field_offset) end |
#size ⇒ Object
Length of dimension
34 35 36 37 38 39 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/tensor_dim.rb', line 34 def size field_offset = @view.unpack_virtual_offset(4) return 0 if field_offset.zero? @view.unpack_long(field_offset) end |