Skip to content

Commit f4ecc6f

Browse files
committed
Fix array assignment for cibuildwheel
1 parent 5117b37 commit f4ecc6f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

H2MM_C/H2MM_C.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3604,6 +3604,7 @@ cdef tuple cast_indexes_times_paths(indexes, times, paths, bint *single, int64_t
36043604

36053605
cdef tuple cpath_ll_full(int64_t nbursts, int64_t *burst_sizes, int32_t **cdeltas, uint8_t **cindexes, uint8_t **cstate_path, h2mm_mod *model, int64_t ncore):
36063606
cdef cnp.ndarray[object, ndim=1] loglik = np.empty(nbursts, dtype=object)
3607+
cdef object obtemp
36073608
cdef cnp.ndarray[double, ndim=1] temp
36083609
cdef int64_t i
36093610
# allocate loglik arrays
@@ -3612,13 +3613,13 @@ cdef tuple cpath_ll_full(int64_t nbursts, int64_t *burst_sizes, int32_t **cdelta
36123613
return MemoryError("insufficient memory"), loglik
36133614
for i in range(nbursts):
36143615
try:
3615-
temp = np.empty(burst_sizes[i], dtype=np.double)
3616+
obtemp = np.empty(burst_sizes[i], dtype=np.double)
36163617
except Exception as exception:
36173618
PyMem_Free(ll)
36183619
return exception, loglik
3620+
temp = obtemp
36193621
loglik[i] = temp
36203622
ll[i] = <double*> temp.data
3621-
print("loglik path")
36223623
cdef int ret = pathloglik_path(nbursts, burst_sizes, cdeltas, cindexes, cstate_path, model, ll, ncore)
36233624
PyMem_Free(ll)
36243625
return ret, loglik

0 commit comments

Comments
 (0)