Remove cstat_sum_cython
@@ -29,27 +29,3 @@ def cash_sum_cython(np.ndarray[np.float_t, ndim=1] counts,
if counts[i] > 0:
sum -= counts[i] * log(npred[i])
return 2 * sum
-
-
-@cython.cdivision(True)
-@cython.boundscheck(False)
-def cstat_sum_cython(np.ndarray[np.float_t, ndim=1] counts,
- np.ndarray[np.float_t, ndim=1] npred):
- """Summed cstat fit statistics.
-
- Parameters
- ----------
- counts : `~numpy.ndarray`
- Counts array.
- npred : `~numpy.ndarray`
- Predicted counts array.
- """
- cdef np.float_t sum = 0
- cdef unsigned int i, ni
- ni = counts.shape[0]
- for i in range(ni):
- if npred[i] > 0:
- sum += npred[i]
- if counts[i] > 0:
- sum += (- counts[i] + counts[i] * log(counts[i] / npred[i]))
- return 2 * sum
\ No newline at end of file
