| 8 | np = import_numpy() |
| 9 | |
| 10 | class NestedStruct(object): |
| 11 | __slots__ = ['_tab'] |
| 12 | |
| 13 | @classmethod |
| 14 | def SizeOf(cls) -> int: |
| 15 | return 32 |
| 16 | |
| 17 | # NestedStruct |
| 18 | def Init(self, buf: bytes, pos: int): |
| 19 | self._tab = flatbuffers.table.Table(buf, pos) |
| 20 | |
| 21 | # NestedStruct |
| 22 | def A(self, j = None): |
| 23 | if j is None: |
| 24 | return [self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + i * 4)) for i in range(self.ALength())] |
| 25 | elif j >= 0 and j < self.ALength(): |
| 26 | return self._tab.Get(flatbuffers.number_types.Int32Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0 + j * 4)) |
| 27 | else: |
| 28 | return None |
| 29 | |
| 30 | # NestedStruct |
| 31 | def AAsNumpy(self): |
| 32 | return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int32Flags, self._tab.Pos + 0, self.ALength()) |
| 33 | |
| 34 | # NestedStruct |
| 35 | def ALength(self) -> int: |
| 36 | return 2 |
| 37 | |
| 38 | # NestedStruct |
| 39 | def AIsNone(self) -> bool: |
| 40 | return False |
| 41 | |
| 42 | # NestedStruct |
| 43 | def B(self): return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(8)) |
| 44 | # NestedStruct |
| 45 | def C(self, j = None): |
| 46 | if j is None: |
| 47 | return [self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(9 + i * 1)) for i in range(self.CLength())] |
| 48 | elif j >= 0 and j < self.CLength(): |
| 49 | return self._tab.Get(flatbuffers.number_types.Int8Flags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(9 + j * 1)) |
| 50 | else: |
| 51 | return None |
| 52 | |
| 53 | # NestedStruct |
| 54 | def CAsNumpy(self): |
| 55 | return self._tab.GetArrayAsNumpy(flatbuffers.number_types.Int8Flags, self._tab.Pos + 9, self.CLength()) |
| 56 | |
| 57 | # NestedStruct |
| 58 | def CLength(self) -> int: |
| 59 | return 2 |
| 60 | |
| 61 | # NestedStruct |
| 62 | def CIsNone(self) -> bool: |
| 63 | return False |
| 64 | |
| 65 | # NestedStruct |
| 66 | def D(self, j = None): |
| 67 | if j is None: |
no outgoing calls