Skip to content

Commit

Permalink
Merge pull request #249 from galenseilis/patch-17
Browse files Browse the repository at this point in the history
Update Weibull distributions.py
  • Loading branch information
geraintpalmer authored Jun 19, 2024
2 parents 8c6bb9a + 93aae43 commit 40134e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ciw/dists/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def __init__(self, scale, shape):
self.shape = shape

def __repr__(self):
return f"Weibull(shape={self.scale}, scale={self.shape})"
return f"Weibull(shape={self.shape}, scale={self.scale})"

def sample(self, t=None, ind=None):
return weibullvariate(self.scale, self.shape)
Expand Down
2 changes: 1 addition & 1 deletion ciw/tests/test_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_dists_repr(self):
self.assertEqual(str(Ga), "Gamma(shape=2.1, scale=4.1)")
self.assertEqual(str(No), "Normal(mean=5.5, sd=0.6)")
self.assertEqual(str(Ln), "Lognormal(mean=5.5, sd=3.6)")
self.assertEqual(str(Wb), "Weibull(shape=8.8, scale=9.9)")
self.assertEqual(str(Wb), "Weibull(shape=9.9, scale=8.8)")
self.assertEqual(str(Em), "Empirical")
self.assertEqual(str(Sq_short), "Sequential([3.3, 10.1])")
self.assertEqual(str(Sq), "Sequential([3.3, ..., 4.4])")
Expand Down

0 comments on commit 40134e6

Please sign in to comment.