Skip to content

Commit

Permalink
Fixed to work with latest version of ElM2D
Browse files Browse the repository at this point in the history
  • Loading branch information
SurgeArrester committed Oct 8, 2021
1 parent 080cb5f commit 29ec24e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ElM2D/ElM2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def _process_list(self, formula_list, n_proc):
pool_list = []


n_elements = len(ElMD().periodic_tab[self.metric])
n_elements = len(ElMD().periodic_tab)
self.input_mat = np.ndarray(shape=(len(formula_list), n_elements), dtype=np.float64)

if self.verbose:
Expand Down Expand Up @@ -437,7 +437,7 @@ def _pool_ElMD(self, input_tuple):
distances[i] = EMD(self.input_mat[input_1],
self.input_mat[input_2],
elmd_obj.lookup,
elmd_obj.periodic_tab[self.metric])
elmd_obj.periodic_tab)

return distances

Expand Down Expand Up @@ -528,7 +528,7 @@ def _process_intersection(self, X, y, n_proc):
'''
pool_list = []

n_elements = len(ElMD().periodic_tab[self.metric])
n_elements = len(ElMD().periodic_tab)
X_mat = np.ndarray(shape=(len(X), n_elements), dtype=np.float64)
y_mat = np.ndarray(shape=(len(y), n_elements), dtype=np.float64)

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
setup(
name = 'ElM2D',
packages = ['ElM2D'],
version = '0.3.18',
version = '0.4.0',
license='GPL3',
description = 'A high performance mapping class to embed large datasets of ionic compositions with respect to the ElMD metric.',
author = 'Cameron Hagreaves',
author_email = 'cameron.h@rgreaves.me.uk',
url = 'https://github.com/lrcfmd/ElM2D/',
download_url = 'https://github.com/lrcfmd/ElM2D/archive/0.3.18.tar.gz',
download_url = 'https://github.com/lrcfmd/ElM2D/archive/0.4.0.tar.gz',
keywords = ['ChemInformatics', 'Materials Science', 'Machine Learning', 'Materials Representation'],
install_requires=[
'cython',
Expand Down

0 comments on commit 29ec24e

Please sign in to comment.