Skip to content

Commit f622419

Browse files
timoryxltwiecki
authored andcommitted
Fix the _random function for sampling from Weibull distribution (#1240)
* Update continuous.py
1 parent 5039e3c commit f622419

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymc3/distributions/continuous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ def random(self, point=None, size=None, repeat=None):
962962
point=point)
963963

964964
def _random(a, b, size=None):
965-
return b * (-np.log(np.random.uniform(size=size)))**a
965+
return b * (-np.log(np.random.uniform(size=size)))**(1/a)
966966

967967
return generate_samples(_random, alpha, beta,
968968
dist_shape=self.shape,

0 commit comments

Comments
 (0)