Skip to content

Commit

Permalink
[pmcx] typecast traj.id from float to uint32, fix #199
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Nov 28, 2023
1 parent 4eec905 commit fae5b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pmcx/pmcx/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def mcxlab(*args):
if len(data):
traj = {}
traj["pos"] = np.transpose(data[1:4, :])
traj["id"] = np.uint32(data[0, :])
traj["id"] = np.frombuffer(data[0, :].tobytes(), dtype=np.uint32)
traj["id"], idx = np.sort(traj["id"]), np.argsort(traj["id"])
traj["pos"] = traj["pos"][idx, :]
traj["data"] = np.vstack([np.single(traj["id"]), data[1:, idx]])
Expand Down

0 comments on commit fae5b72

Please sign in to comment.