avoid some calculations in the cython likelihood calculation