summaryrefslogtreecommitdiff
path: root/ml_exp/qm7db.py
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-02-29 11:45:17 -0700
committerDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-02-29 11:45:17 -0700
commit53c84552df5c7a7e1f084b0aec8eac63f7813e52 (patch)
tree3f656bb9b76e8a4abb2ceeda8adac1c6b59139c7 /ml_exp/qm7db.py
parent9e90b73721edf370f7be9c77aba8431bbe762bdb (diff)
Change dtypes to np dtypes
Diffstat (limited to 'ml_exp/qm7db.py')
-rw-r--r--ml_exp/qm7db.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ml_exp/qm7db.py b/ml_exp/qm7db.py
index 3fd46b6bc..3ba2c5814 100644
--- a/ml_exp/qm7db.py
+++ b/ml_exp/qm7db.py
@@ -42,14 +42,14 @@ def qm7db(db_path='data',
for i, line in enumerate(lines):
line = line.split()
compounds.append(Compound(f'{db_path}/{line[0]}'))
- compounds[i].pbe0 = float(line[1])
- compounds[i].delta = float(line[1]) - float(line[2])
+ compounds[i].pbe0 = np.float64(line[1])
+ compounds[i].delta = np.float64(line[1]) - np.float64(line[2])
if is_shuffled:
random.seed(r_seed)
random.shuffle(compounds)
- e_pbe0 = np.array([compound.pbe0 for compound in compounds], dtype=float)
- e_delta = np.array([compound.delta for compound in compounds], dtype=float)
+ e_pbe0 = np.array([comp.pbe0 for comp in compounds], dtype=np.float64)
+ e_delta = np.array([comp.delta for comp in compounds], dtype=np.float64)
return compounds, e_pbe0, e_delta