Skip to content

Commit

Permalink
fix for issue1306
Browse files Browse the repository at this point in the history
  • Loading branch information
jswhit committed Jan 21, 2024
1 parent 7b4f881 commit 58a5ba0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/netCDF4/_netCDF4.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4987,7 +4987,10 @@ rename a `Variable` attribute named `oldname` to `newname`."""
# special case of scalar VLEN
data[0] = datout
else:
data[tuple(i)] = datout.reshape(shape)
if self._isvlen and not shape:
data[tuple(i)] = datout.item()
else:
data[tuple(i)] = datout.reshape(shape)

# Remove extra singleton dimensions.
if hasattr(data,'shape'):
Expand Down

0 comments on commit 58a5ba0

Please sign in to comment.