Skip to content

Commit

Permalink
Merge branch 'trunk-patch' into trunk-minor
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Jul 28, 2023
2 parents efeb19b + e254ba7 commit d342652
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Change Log
3.1.0 (2023-07-??)
^^^^^^^^^^^^^^^^^^

*Fixed:*

* ``hoomd.read_log`` no longer triggers a numpy deprecation warning.

*Added:*

* ``HOOMDTrajectory.flush`` - flush buffered writes on an open ``HOOMDTrajectory``.
Expand Down
7 changes: 5 additions & 2 deletions gsd/hoomd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,10 @@ def read_log(name, scalar_only=False):
for log in logged_data_dict.keys():
if not gsdfileobj.chunk_exists(frame=idx, name=log):
continue
logged_data_dict[log][idx] = gsdfileobj.read_chunk(
frame=idx, name=log)
data = gsdfileobj.read_chunk(frame=idx, name=log)
if len(logged_data_dict[log][idx].shape) == 0:
logged_data_dict[log][idx] = data[0]
else:
logged_data_dict[log][idx] = data

return logged_data_dict

0 comments on commit d342652

Please sign in to comment.