Skip to content
Snippets Groups Projects
Commit d44e10fc authored by ='s avatar =
Browse files

only load dict

parent 9156c5f6
No related branches found
No related tags found
No related merge requests found
......@@ -13,9 +13,14 @@ def load_atlas(load_path: Path) -> tuple[jnp.ndarray, jnp.ndarray, list[MeshObje
with h5py.File(load_path, "r") as f:
maps = jnp.array(f["/maps"][:])
points = jnp.array(f["/positions"][:])
mesh_object_dict = load_atlas_dict(load_path)
mesh_object_list = list(map(from_dict, mesh_object_dict))
return maps, points, mesh_object_list
def load_atlas_dict(load_path: Path):
with h5py.File(load_path, "r") as f:
mesh_object_str = f.attrs["mesh_list"]
mesh_object_dict = json.loads(mesh_object_str)
mesh_object_list = list(map(from_dict, mesh_object_dict))
return maps, points, mesh_object_list
return mesh_object_dict
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment