Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions numpyro/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,11 @@ def sample(
)
if not isinstance(fn, numpyro.distributions.Distribution):
type_error = TypeError(
"It looks like you tried to use a fn that isn't an instance of "
"Invalid type for 'fn': expected an instance of "
"numpyro.distributions.Distribution, funsor.Funsor or "
"tensorflow_probability.distributions.Distribution. If you're using "
"funsor or tensorflow_probability, make sure they are correctly installed."
"tensorflow_probability.distributions.Distribution, "
f"but received {type(fn).__name__}. If you're using funsor or "
"tensorflow_probability, make sure they are correctly installed."
)

# fn can be a funsor.Funsor, but this won't be installed for all users
Expand Down
Loading