Skip to content

Commit

Permalink
fix(tod): fixes bug where data variable overwritten
Browse files Browse the repository at this point in the history
Fixes bug in `_copy_non_time_data` where the `data` variable
was being over written if a dataset without a time axis was
encountered.

Bug introduced in commit 249face.
  • Loading branch information
ssiegelx authored and jrs65 committed Mar 26, 2020
1 parent c0b83ef commit 0ed8b2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caput/tod.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,12 @@ def _copy_non_time_data(
):
to_dataset_names.append(entry.name)
elif out is not None:
data = (
arr = (
memh5.ensure_unicode(entry.data)
if convert_dataset_strings
else entry.data
)
out.create_dataset(key, shape=entry.shape, dtype=entry.dtype, data=data)
out.create_dataset(key, shape=entry.shape, dtype=entry.dtype, data=arr)
memh5.copyattrs(
entry.attrs, out[key].attrs, convert_strings=convert_dataset_strings
)
Expand Down

0 comments on commit 0ed8b2c

Please sign in to comment.