Skip to content

Commit

Permalink
use to_numpy instead of values
Browse files Browse the repository at this point in the history
  • Loading branch information
mhangaard committed Mar 2, 2020
1 parent fe46f9c commit ae0a1f9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion catlearn/featurize/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def featurize_atomic_pairs(self, candidates):
for atoms in tqdm(candidates):
# One hot encode elements.
dummies = pd.get_dummies(atoms.numbers)
d = dummies.T.reindex(self.atom_types).fillna(0).T.values
d = dummies.T.reindex(self.atom_types).fillna(0).T.to_numpy()

# Number of pairs by 1 + number of element types data matrix.
n_pairs = len(atoms) ** 2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kiwisolver>=1.0.1
markupsafe>=1.0
networkx>=2.1.0
numpy>=1.14.3
pandas>=0.23.0
pandas>=0.24.0
psutil>=5.4.3
pyparsing>=2.2.0
python-dateutil>=2.7.3
Expand Down
2 changes: 1 addition & 1 deletion tutorials/09_bulk_fingerprints/Voronoi_FP.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"metadata": {},
"outputs": [],
"source": [
"matrix = data_frame.values\n",
"matrix = data_frame.to_numpy()\n",
"finite_numeric_data = clean_infinite(matrix)\n",
"print(np.shape(finite_numeric_data['train']))"
]
Expand Down
2 changes: 1 addition & 1 deletion tutorials/09_bulk_fingerprints/Voronoi_FP.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
# In[5]:


matrix = data_frame.values
matrix = data_frame.to_numpy()
finite_numeric_data = clean_infinite(matrix)
print(np.shape(finite_numeric_data['train']))

Expand Down

0 comments on commit ae0a1f9

Please sign in to comment.