blob: dc475f9f865ed7ac76236d5d0877fc1903dfb6de [file] [log] [blame]
Tim Hall79d07d22020-04-27 18:20:16 +01001# automatically generated by the FlatBuffers compiler, do not modify
2
3# namespace: tflite
4
5import flatbuffers
6
7class Uint8Vector(object):
8 __slots__ = ['_tab']
9
10 @classmethod
11 def GetRootAsUint8Vector(cls, buf, offset):
12 n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
13 x = Uint8Vector()
14 x.Init(buf, n + offset)
15 return x
16
17 # Uint8Vector
18 def Init(self, buf, pos):
19 self._tab = flatbuffers.table.Table(buf, pos)
20
21 # Uint8Vector
22 def Values(self, j):
23 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
24 if o != 0:
25 a = self._tab.Vector(o)
26 return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1))
27 return 0
28
29 # Uint8Vector
30 def ValuesAsNumpy(self):
31 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
32 if o != 0:
33 return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o)
34 return 0
35
36 # Uint8Vector
37 def ValuesLength(self):
38 o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
39 if o != 0:
40 return self._tab.VectorLen(o)
41 return 0
42
43def Uint8VectorStart(builder): builder.StartObject(1)
44def Uint8VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0)
45def Uint8VectorStartValuesVector(builder, numElems): return builder.StartVector(1, numElems, 1)
46def Uint8VectorEnd(builder): return builder.EndObject()