Maxyme / faster_fishers

Fast implementation of Fisher's exact test in Rust for Python.
MIT License
5 stars 0 forks source link

What are a_values, b_values, c_values, d_values? #1

Open bw2 opened 5 months ago

bw2 commented 5 months ago

I'm having trouble understanding how to use the python interface.

What would be the equivalent code to

from scipy.stats import fisher_exact
fisher_exact([[10, 5], [3,4]])

?

Maxyme commented 3 months ago

This would be the way to do it, by passing arrays of only 1 value for a,b,c and d:

import numpy as np
from faster_fishers import exact
lefts, right, two_tails = exact(np.array([10], dtype=np.uint64), np.array([5], dtype=np.uint64), np.array([3], dtype=np.uint64), np.array([4], dtype=np.uint64))