Function choice_with_p
Source pub fn choice_with_p<B: Backend, T: Element, F: Float>(
key: &Key<B>,
a: &Array<B, T>,
shape: impl Into<Shape>,
replace: bool,
p: &Array<B, F>,
) -> Array<B, T>
Expand description
Random elements of a along axis 0 with probabilities p
(jax.random.choice with p and axis=0), with or without
replacement.
ยงPanics
Panics as choice does, or if p does not have one element per row
of a.