Skip to content

Commit 4035cd1

Browse files
committed
fix error with Mixtrue distribtion
1 parent 8609fbd commit 4035cd1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ciw/dists/distributions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ class MixtureDistribution(Distribution):
695695
696696
Methods
697697
-------
698-
sample(t: float, inds: List[Individual] = None) -> float:
698+
sample(t: float, ind: Individual = None) -> float:
699699
Generate a random sample from the mixture distribution.
700700
701701
Notes
@@ -719,16 +719,16 @@ def __init__(self, dists: List[Distribution], probs: List[float]) -> NoReturn:
719719
self.probs = probs
720720
self.dists = dists
721721

722-
def sample(self, t: float = None, inds: List[Individual] = None) -> float:
722+
def sample(self, t: float = None, ind: Individual = None) -> float:
723723
"""
724724
Generate a random sample from the mixture distribution.
725725
726726
Parameters
727727
----------
728728
t : float
729729
The time parameter for the sample generation.
730-
inds : List[Individual], optional
731-
List of individuals associated with the sample, if applicable.
730+
inds : Individual, optional
731+
The individual to sample a time for, if applicable.
732732
733733
Returns
734734
-------
@@ -740,7 +740,7 @@ def sample(self, t: float = None, inds: List[Individual] = None) -> float:
740740
weights=self.probs,
741741
k=1)[0]
742742

743-
return chosen_dist.sample(t, inds)
743+
return chosen_dist.sample(t, ind)
744744

745745
def __repr__(self):
746746
return "MixtureDistribution"

0 commit comments

Comments
 (0)