MCPcopy Create free account
hub / github.com/openai/point-e / load

Method load

point_e/util/point_cloud.py:32–45  ·  view source on GitHub ↗

Load the point cloud from a .npz file.

(cls, f: Union[str, BinaryIO])

Source from the content-addressed store, hash-verified

30
31 @classmethod
32 def load(cls, f: Union[str, BinaryIO]) -> "PointCloud":
33 """
34 Load the point cloud from a .npz file.
35 """
36 if isinstance(f, str):
37 with open(f, "rb") as reader:
38 return cls.load(reader)
39 else:
40 obj = np.load(f)
41 keys = list(obj.keys())
42 return PointCloud(
43 coords=obj["coords"],
44 channels={k: obj[k] for k in keys if k != "coords"},
45 )
46
47 def save(self, f: Union[str, BinaryIO]):
48 """

Callers

nothing calls this directly

Calls 2

PointCloudClass · 0.85
keysMethod · 0.80

Tested by

no test coverage detected