Skip to content

Commit 7bd4955

Browse files
authored
distributions.mixtures._MixtureBase: mixtures lack reparameterized sampling (#2106)
Testing Done: create a mixture distribution, check its has_rsample Signed-off-by: Eli Sennesh <elisennesh@gmail.com>
1 parent 1e7d986 commit 7bd4955

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numpyro/distributions/mixtures.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ def component_sample(
8080
def component_cdf(self, samples: ArrayLike) -> ArrayLike:
8181
raise NotImplementedError
8282

83+
@property
84+
def has_rsample(self) -> bool:
85+
return False
86+
8387
@property
8488
def mixture_size(self) -> int:
8589
"""The number of components in the mixture"""

0 commit comments

Comments
 (0)