MCPcopy Create free account
hub / github.com/Pointcept/PointTransformerV3 / __getitem__

Method __getitem__

model.py:207–215  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

205 self.add_module(name, module)
206
207 def __getitem__(self, idx):
208 if not (-len(self) <= idx < len(self)):
209 raise IndexError("index {} is out of range".format(idx))
210 if idx < 0:
211 idx += len(self)
212 it = iter(self._modules.values())
213 for i in range(idx):
214 next(it)
215 return next(it)
216
217 def __len__(self):
218 return len(self._modules)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected