mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-05 01:32:40 +02:00
Fix normalizer to catch when output scale is zero.
This commit is contained in:
parent
11f806df3f
commit
943be980d4
1 changed files with 1 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ class Standardize(_Norm):
|
|||
Y = np.ma.masked_invalid(Y, copy=False)
|
||||
self.mean = Y.mean(0).view(np.ndarray)
|
||||
self.std = Y.std(0).view(np.ndarray)
|
||||
if np.any(self.std) == 0:
|
||||
if np.any(self.std == 0):
|
||||
self.std[np.where(Y_std==0)]=1.
|
||||
warnings.warn("Some values of Y have standard deviation of zero. Resetting to 1.0 to avoid divide by zero errors.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue