diff options
author | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-02-29 11:45:17 -0700 |
---|---|---|
committer | David Luevano Alvarado <55825613+luevano@users.noreply.github.com> | 2020-02-29 11:45:17 -0700 |
commit | 53c84552df5c7a7e1f084b0aec8eac63f7813e52 (patch) | |
tree | 3f656bb9b76e8a4abb2ceeda8adac1c6b59139c7 /ml_exp/compound.py | |
parent | 9e90b73721edf370f7be9c77aba8431bbe762bdb (diff) |
Change dtypes to np dtypes
Diffstat (limited to 'ml_exp/compound.py')
-rw-r--r-- | ml_exp/compound.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ml_exp/compound.py b/ml_exp/compound.py index e2b7ab7fd..4428e9164 100644 --- a/ml_exp/compound.py +++ b/ml_exp/compound.py @@ -153,15 +153,15 @@ class Compound: lines = f.readlines() self.name = filename.split('/')[-1] - self.n = int(lines[0]) + self.n = np.int32(lines[0]) self.extra = lines[1] self.atoms = [] - self.atoms_nc = np.empty(self.n, dtype=int) - self.coordinates = np.empty((self.n, 3), dtype=float) + self.atoms_nc = np.empty(self.n, dtype=np.int64) + self.coordinates = np.empty((self.n, 3), dtype=np.float64) for i, atom in enumerate(lines[2:self.n + 2]): atom_d = atom.split() self.atoms.append(atom_d[0]) self.atoms_nc[i] = NUCLEAR_CHARGE[atom_d[0]] - self.coordinates[i] = np.asarray(atom_d[1:4], dtype=float) + self.coordinates[i] = np.asarray(atom_d[1:4], dtype=np.float64) |