Skip to content

Commit

Permalink
Specify dtypes for read_csv when reading rates file (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
l-repa authored Dec 18, 2023
1 parent 6f0c326 commit 3fbf9fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions multibind/nonequilibrium.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def rate_matrix(filename: str) -> (Multibind, np.ndarray, np.ndarray):
2D array with the standard error on the projected rates.
"""

_rates = pd.read_csv(filename, header=0)

_rates = pd.read_csv(filename, header=0, dtype={'state1': str, 'state2': str, 'k': np.float64, 'var': np.float64})
with tempfile.TemporaryDirectory() as tmpdirname:
# multibind requires that states and graphs are defined within csv files, we will create temporary files
states_filename = os.path.join(tmpdirname, "states.csv")
Expand Down

0 comments on commit 3fbf9fb

Please sign in to comment.