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

Method chunk

pointersect/inference/structures.py:1046–1057  ·  view source on GitHub ↗

Return a

(self, chunks: int, dim: int = 0)

Source from the content-addressed store, hash-verified

1044 return self
1045
1046 def chunk(self, chunks: int, dim: int = 0) -> T.List['Ray']:
1047 """Return a"""
1048 origins_w_list = self.origins_w.chunk(chunks, dim)
1049 directions_w_list = self.directions_w.chunk(chunks, dim)
1050 rays = []
1051 for origins_w, directions_w in zip(origins_w_list, directions_w_list):
1052 ray = Ray(
1053 origins_w=origins_w,
1054 directions_w=directions_w,
1055 )
1056 rays.append(ray)
1057 return rays
1058
1059 def random_perturb_direction(
1060 self,

Callers 14

forwardMethod · 0.45
compute_zsMethod · 0.45
compute_attn_weightsMethod · 0.45
plot_multiple_imagesFunction · 0.45
intersect_pcd_and_rayFunction · 0.45
chunkMethod · 0.45
chunkMethod · 0.45
splitMethod · 0.45

Calls 1

RayClass · 0.85

Tested by

no test coverage detected