summaryrefslogtreecommitdiff
path: root/src/python/gudhi/representations/vector_methods.py
diff options
context:
space:
mode:
authorManu <msoriano4@us.es>2022-02-23 19:20:06 +0100
committerManu <msoriano4@us.es>2022-02-23 19:20:06 +0100
commit758111506dfb99cdc59981395386926e178d447c (patch)
tree4b5adc1e7d20670e4d587112fbfec9e53545f2de /src/python/gudhi/representations/vector_methods.py
parent3b7bd4fd8b21fc8ce0d7b2848b5ac9bdd397c080 (diff)
a test for gudhi.representations.Entropy has been added
Diffstat (limited to 'src/python/gudhi/representations/vector_methods.py')
-rw-r--r--src/python/gudhi/representations/vector_methods.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/gudhi/representations/vector_methods.py b/src/python/gudhi/representations/vector_methods.py
index 57ca5999..ef1329d0 100644
--- a/src/python/gudhi/representations/vector_methods.py
+++ b/src/python/gudhi/representations/vector_methods.py
@@ -532,7 +532,7 @@ class Entropy(BaseEstimator, TransformerMixin):
for k in range(min_idx, max_idx):
ent[k] += (-1) * p[j] * np.log(p[j])
if self.normalized:
- ent = ent / np.linalg.norm(ent, ord=1)
+ ent = ent / (np.linalg.norm(ent, ord=1))
Xfit.append(np.reshape(ent,[1,-1]))
Xfit = np.concatenate(Xfit, axis=0)