MCPcopy Create free account
hub / github.com/Atrovast/THGS / _process

Method _process

ext/spt/transforms/data.py:402–407  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

400 self.idx = tensor_idx(idx) if idx is not None else None
401
402 def _process(self, data):
403 if self.idx is None or getattr(data, self.key, None) is None:
404 return data
405 idx = tensor_idx(torch.as_tensor(self.idx, device=data.device))
406 data[self.key] = data[self.key][:, idx]
407 return data
408
409
410class NAGSelectColumns(Transform):

Callers

nothing calls this directly

Calls 1

tensor_idxFunction · 0.90

Tested by

no test coverage detected