Skip to content

Commit

Permalink
Merge pull request #510 from jamesmartini/develop_entropy506
Browse files Browse the repository at this point in the history
API: entropy returns self.entropy_terms().row_sum().array
  • Loading branch information
GavinHuttley committed Jan 30, 2020
2 parents a5e7784 + f0b44d7 commit a6b82a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cogent3/core/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ def entropy_terms(self):

def entropy(self):
"""Shannon entropy per position using safe log2"""
return self.entropy_terms().row_sum()
result = self.entropy_terms().row_sum()
return result.array

def information(self):
"""returns information as -max_entropy - entropy"""
Expand Down

0 comments on commit a6b82a0

Please sign in to comment.