Skip to content

Commit

Permalink
Fixed bug in sort
Browse files Browse the repository at this point in the history
  • Loading branch information
SurgeArrester committed Mar 6, 2021
1 parent 387985f commit 18209e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ElM2D/ElM2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def PCA(self, n_components=5):

return Y[:, :n_components]

def sort_compositions(self, X):
def sort_compositions(self, X=None):
"""
Parameters: X, an iterable list of compositions in string format
Returns: The indices of the input list as they fall in sorted order compositionally
Expand All @@ -261,7 +261,7 @@ def sort_compositions(self, X):
sorted_indices = ChemMapper.sort_compositions(comps)
sorted_comps = comps[sorted_indices]
"""
if self.dm == None:
if self.dm is None:
self.fit(X)

dists_1D = self.PCA(n_components=1)
Expand Down

0 comments on commit 18209e3

Please sign in to comment.