diff --git a/ibicus/utils/_math_utils.py b/ibicus/utils/_math_utils.py index 8f36711..2c753a5 100644 --- a/ibicus/utils/_math_utils.py +++ b/ibicus/utils/_math_utils.py @@ -279,7 +279,7 @@ def cdf(self, x: np.ndarray, *fit: tuple) -> np.ndarray: else: return np.where( x == 0, - np.random.uniform(0, p0), + np.random.uniform(0, p0, x.shape), p0 + (1 - p0) * self.distribution.cdf(x, *fit_rainy_days), ) @@ -423,7 +423,7 @@ def cdf(self, x: np.ndarray, *fit: tuple) -> np.ndarray: """ x = np.where( x < self.censoring_threshold, - np.random.uniform(0, self.censoring_threshold), + np.random.uniform(0, self.censoring_threshold, x.shape), x, ) return scipy.stats.gamma.cdf(x, *fit)