Skip to content

Commit

Permalink
fix-226
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbhughes authored Nov 16, 2024
1 parent f4e0755 commit ac90998
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions regularizepsf/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def save(self, path: pathlib.Path) -> None:
None
"""
path = pathlib.Path(path)
if path.suffix == ".h5":
with h5py.File(path, "w") as f:
f.create_dataset("coordinates", data=self.coordinates)
Expand Down Expand Up @@ -201,6 +202,7 @@ def load(cls, path: pathlib.Path) -> ArrayPSFTransform:
PSFTransform
"""
path = pathlib.Path(path)
if path.suffix == ".h5":
with h5py.File(path, "r") as f:
coordinates = [tuple(c) for c in f["coordinates"][:]]
Expand Down

0 comments on commit ac90998

Please sign in to comment.