Skip to content
Snippets Groups Projects
Commit 8b6edd8e authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[utils] fixed helper function, to avoid dividing by zero

parent 287abb39
Branches
Tags v3.2.0
1 merge request!33WIP: added LDA and MLP
...@@ -276,7 +276,10 @@ def mean_std_normalize(features, ...@@ -276,7 +276,10 @@ def mean_std_normalize(features,
for row in features: # row is a sample for row in features: # row is a sample
row_norm = (row - features_mean) / features_std if features_std.all() != 0:
row_norm = (row - features_mean) / features_std
else:
row_norm = (row - features_mean)
row_norm_list.append(row_norm) row_norm_list.append(row_norm)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment