sample#
- abstractmethod Distribution.sample(*, sample_shape: Tuple[int, ...] = None, return_logp: bool = False, **kwargs) NDArray[Any] | jnp.ndarray | tf.Tensor | torch.Tensor | Tuple[NDArray[Any] | jnp.ndarray | tf.Tensor | torch.Tensor, NDArray[Any] | jnp.ndarray | tf.Tensor | torch.Tensor][source]#
Draw a sample from the distribution.
- Parameters:
- Returns:
The sampled values. If return_logp is True, returns a tuple of the sampled values and its logp.
- Return type:
NDArray[Any] | jnp.ndarray | tf.Tensor | torch.Tensor | Tuple[NDArray[Any] | jnp.ndarray | tf.Tensor | torch.Tensor, NDArray[Any] | jnp.ndarray | tf.Tensor | torch.Tensor]