Skip to content

Commit

Permalink
Compression bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcvey3 committed Mar 7, 2024
1 parent 6ef5bd6 commit c89d083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dolfyn/io/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def save(ds, filename,

if compression:
# New netcdf4-c cannot compress variable length strings
if isinstance(ds[ky].data[0], str):
if ds[ky].size <= 1 or isinstance(ds[ky].data[0], str):
continue
enc[ky].update(dict(zlib=True, complevel=1))

Expand Down

0 comments on commit c89d083

Please sign in to comment.