Skip to content

Commit c5c28a4

Browse files
committed
basic dataset read/write methods added
1 parent bad4012 commit c5c28a4

File tree

8 files changed

+1159
-108
lines changed

8 files changed

+1159
-108
lines changed

src/h5json/dset_util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ def resize_dataset(dset_json, shape):
107107
raise TypeError(f"dataset with shape class: {shape_class} cannot be resized")
108108
if len(shape_class["dims"]) != len(shape):
109109
raise ValueError("Resize shape parameter doesn't match dataset's rank")
110-
# TBD: validate shape
110+
if shape_json["dims"] == list(shape):
111+
# no change, just return
112+
return
111113
shape_json["dims"] = list(shape)
112114
dset_json["modified"] = time.time()
113115

0 commit comments

Comments
 (0)