MCPcopy Create free account
hub / github.com/apple/ml-pointersect / check_dim

Method check_dim

pointersect/inference/structures.py:160–168  ·  view source on GitHub ↗

Check all attributes have the same number of points.

(self)

Source from the content-addressed store, hash-verified

158 setattr(self, 'normal_w', None)
159
160 def check_dim(self):
161 """Check all attributes have the same number of points."""
162 n = self.xyz_w.size(1)
163 for name in self.attr_names:
164 arr = getattr(self, name, None)
165 if arr is None:
166 continue
167 else:
168 assert arr.size(1) == n, f'{name}.shape = {arr.shape}, num_points not {n}'
169
170 def insert_point_at_inf(self):
171 """

Callers 4

__init__Method · 0.95
insert_point_at_infMethod · 0.95
reset_point_at_infMethod · 0.95
remove_point_at_infMethod · 0.95

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected