Commit 8b6edd8e authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

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

parent 287abb39
...@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment