Skip to content

Commit

Permalink
[datasets] do not attempt to write if input empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed Jan 26, 2024
1 parent 4b935f6 commit 4dc50f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/nimhdf5/datasets.nim
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ proc write*[T](dset: H5DataSet, data: seq[T]) =
## TODO: create an appropriate Exception for this case!
# TODO: IMPORTANT: think about whether we should be using array types instead
# of a dataspace of certain dimensions for arrays / nested seqs we're handed
if data.len == 0: return # nothing to write!
let shape = dset.shape
withDebug:
echo "shape is ", shape, " of dset ", dset.name
Expand Down

0 comments on commit 4dc50f9

Please sign in to comment.