Skip to content
Snippets Groups Projects
Commit 68b770bc authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 7e9f7a1d
Branches
Tags
No related merge requests found
......@@ -1291,13 +1291,18 @@ def normalize(data, param, mean_std_dict):
if mean_std_dict.get(param) is None:
return data
shape = data.shape
data = data.flatten()
mean, std = mean_std_dict.get(param)
data -= mean
data /= std
not_valid = np.invert(np.isnan(data))
not_valid = np.isnan(data)
data[not_valid] = 0
data = np.reshape(data, shape)
return data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment