Skip to content

Commit 9bee140

Browse files
improve lookup dict creation
1 parent a40ec44 commit 9bee140

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package/MDAnalysis/analysis/hydrogenbonds/hbond_analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ def count_by_time(self):
920920
# so we do a manual lookup and return instead. some frames might be zero
921921
# so they would be missing from the np.unique return
922922
if self.start is None:
923-
count_lookup = {idx: count for idx, count in zip(indices, tmp_counts)}
923+
count_lookup = dict(zip(indices, tmp_counts))
924924
return np.array([count_lookup.get(i, 0) for i in range(len(self.frames))])
925925

926926
indices -= self.start

0 commit comments

Comments
 (0)