MCPcopy Index your code
hub / github.com/apple/ml-pointersect / cat

Method cat

pointersect/inference/structures.py:1092–1100  ·  view source on GitHub ↗
(rays: T.List['Ray'], dim: int)

Source from the content-addressed store, hash-verified

1090
1091 @staticmethod
1092 def cat(rays: T.List['Ray'], dim: int) -> 'Ray':
1093 out_dict = dict()
1094 for name in ['origins_w', 'directions_w']:
1095 arr = [getattr(p, name, None) for p in rays]
1096 if None in arr:
1097 out_dict[name] = None
1098 else:
1099 out_dict[name] = torch.cat(arr, dim=dim)
1100 return Ray(**out_dict)
1101
1102 def masked_fill(self, mask: torch.Tensor, ray_src: 'Ray'):
1103 self.origins_w[mask] = ray_src.origins_w[mask]

Callers 15

testMethod · 0.45
_flatten_dense_tensorsFunction · 0.45
forwardMethod · 0.45
compute_zsMethod · 0.45
forwardMethod · 0.45
cat_dictFunction · 0.45
compute_3d_xyzFunction · 0.45
compute_xyz_w_from_uvFunction · 0.45
pinhole_projectionFunction · 0.45
compute_3d_zdir_and_dpsFunction · 0.45

Calls 1

RayClass · 0.85

Tested by 1

testMethod · 0.36