MCPcopy Create free account
hub / github.com/Jasonkks/PTTR / convertToPytorch

Method convertToPytorch

data_classes.py:105–110  ·  view source on GitHub ↗

Helper from pytorch. :return: Pytorch array of points.

(self)

Source from the content-addressed store, hash-verified

103 np.vstack((self.points[:3, :], np.ones(self.nbr_points()))))[:3, :]
104
105 def convertToPytorch(self):
106 """
107 Helper from pytorch.
108 :return: Pytorch array of points.
109 """
110 return torch.from_numpy(self.points)
111
112 @staticmethod
113 def fromPytorch(cls, pytorchTensor):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected