Skip to content

Commit

Permalink
basic dataset read/write methods added
Browse files Browse the repository at this point in the history
  • Loading branch information
jreadey committed Feb 26, 2025
1 parent bad4012 commit c5c28a4
Show file tree
Hide file tree
Showing 8 changed files with 1,159 additions and 108 deletions.
4 changes: 3 additions & 1 deletion src/h5json/dset_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ def resize_dataset(dset_json, shape):
raise TypeError(f"dataset with shape class: {shape_class} cannot be resized")
if len(shape_class["dims"]) != len(shape):
raise ValueError("Resize shape parameter doesn't match dataset's rank")
# TBD: validate shape
if shape_json["dims"] == list(shape):
# no change, just return
return
shape_json["dims"] = list(shape)
dset_json["modified"] = time.time()

Expand Down
Loading

0 comments on commit c5c28a4

Please sign in to comment.