Skip to content

Commit

Permalink
Fix issue of premature termination because of prop0 being int
Browse files Browse the repository at this point in the history
  • Loading branch information
dileep-kishore committed Oct 7, 2018
1 parent 63490bd commit cf1c19d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyssa/pyssa_cython.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Na = 6.023e23 # Avogadro's constant
@cython.wraparound(False)
cdef (int, int) cy_roulette_selection(double[:] prop_list, long[:] Xt):
"""Perform roulette selection on the list of propensities"""
cdef int prop0 = np.sum(prop_list) # Sum of propensities
cdef double prop0 = np.sum(prop_list) # Sum of propensities
cdef int status
if prop0 == 0:
if np.sum(Xt) == 0:
Expand Down

0 comments on commit cf1c19d

Please sign in to comment.