Skip to content

Commit

Permalink
Make sure exponentiation produces integer
Browse files Browse the repository at this point in the history
This didn't cause problems before for some reason,
but now numpy errors without this change.
  • Loading branch information
jussiviinikka committed Sep 27, 2023
1 parent c9c8fda commit fe00a3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sumu/scores/_scorer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ cdef class BDeu:
cdef int v, i, n, K
n = len(C)
K = len(C[0])
cdef np.ndarray score_array = np.full((n, 2**K), -np.inf)
cdef np.ndarray score_array = np.full((n, int(2**K)), -np.inf)
memview_C = C
for v in np.arange(memview_C.shape[0], dtype=np.int32):
self.thisptr.fami(v, & memview_C[v, 0],
Expand Down

0 comments on commit fe00a3a

Please sign in to comment.