MCPcopy Create free account
hub / github.com/Robotics-STAR-Lab/H2-Mapping / log_numpy_data

Method log_numpy_data

mapping/src/loggers.py:62–68  ·  view source on GitHub ↗
(self, data, name, ind=None)

Source from the content-addressed store, hash-verified

60 o3d.io.write_point_cloud(out_path, pcd)
61
62 def log_numpy_data(self, data, name, ind=None):
63 if isinstance(data, torch.Tensor):
64 data = data.detach().cpu().numpy()
65 if ind is not None:
66 np.save(osp.join(self.misc_dir, "{}-{:05d}.npy".format(name, ind)), data)
67 else:
68 np.save(osp.join(self.misc_dir, f"{name}.npy"), data)
69
70 def log_debug_data(self, data, idx):
71 with open(os.path.join(self.misc_dir, f"scene_data_{idx}.pkl"), 'wb') as f:

Callers 1

runMethod · 0.80

Calls 2

joinMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected