Skip to content

Commit

Permalink
sort multi-array dict before serializing
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed May 13, 2024
1 parent 52429eb commit ae27888
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modflow_devtools/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
def _serialize_bytes(data):
buffer = BytesIO()
if isinstance(data, dict):
# sort by keys
data = OrderedDict(sorted(data.items()))
np.savez_compressed(buffer, **data)
else:
np.save(buffer, data)
Expand Down

0 comments on commit ae27888

Please sign in to comment.