Skip to content

Commit

Permalink
data
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Mar 21, 2024
1 parent 01ba322 commit c798509
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/hdmf/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ def append_data(data, arg):
data.append(arg)
return data
elif isinstance(data, np.ndarray):
return np.append(data, arg)
if len(data.dtype)!=0:
# This is for compound data, i.e., structured arrays
return np.append(data, arg)
else:
return np.append(data, np.expand_dims(arg, axis=0), axis=0)
elif isinstance(data, h5py.Dataset):
shape = list(data.shape)
shape[0] += 1
Expand Down

0 comments on commit c798509

Please sign in to comment.