Function information::prob::prob3d
source · [−]pub fn prob3d(
arr_a: &Array1<usize>,
arr_b: &Array1<usize>,
arr_c: &Array1<usize>,
nbins_a: usize,
nbins_b: usize,
nbins_c: usize
) -> Result<Array3<f64>>
Expand description
Calculates the event intersection probability between three arrays of equal size
Usage
use ndarray::array;
use information::prob3d;
let arr_a = array![0, 1];
let arr_b = array![0, 1];
let arr_c = array![0, 1];
let expected = array![[[0.5, 0.0], [0.0, 0.0]],
[[0.0, 0.0], [0.0, 0.5]]];
let prob = prob3d(&arr_a, &arr_b, &arr_c, 2, 2, 2).unwrap();
assert_eq!(prob.shape(), &[2, 2, 2]);
assert_eq!(prob, expected);