Skip to content

Commit 9fac9fa

Browse files
authored
Merge pull request #136 from dwhswenson/fix-pandas
2 parents a4225ce + 07d6bc7 commit 9fac9fa

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,6 @@ docs/_build/
7171

7272
# PyBuilder
7373
target/
74+
# pixi environments
75+
.pixi/*
76+
!.pixi/config.toml

contact_map/contact_map.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import collections
77
import itertools
88
import pickle
9+
import io
910
import json
1011

1112
import warnings
@@ -273,7 +274,7 @@ def from_dict(cls, dct):
273274
def _deserialize_topology(topology_json):
274275
"""Create MDTraj topology from JSON-serialized version"""
275276
table, bonds = json.loads(topology_json)
276-
topology_df = pd.read_json(table)
277+
topology_df = pd.read_json(io.StringIO(table))
277278
topology = md.Topology.from_dataframe(topology_df,
278279
np.array(bonds))
279280
return topology

0 commit comments

Comments
 (0)