@@ -31,17 +31,17 @@ test_index += test_cue_index
31
31
assert test_index == 18446744069414584320
32
32
33
33
34
- cdef inline void read_next_int(void * data, FILE * binary_file) nogil:
34
+ cdef inline void read_next_int(void * data, FILE * binary_file) noexcept nogil:
35
35
fread(data, 4 , 1 , binary_file) # little endian
36
36
37
37
38
38
cdef extern from " stdio.h" :
39
39
# FILE * fopen ( const char * filename, const char * mode )
40
- FILE * fopen(const char * , const char * ) nogil
40
+ FILE * fopen(const char * , const char * ) noexcept nogil
41
41
# int fclose ( FILE * stream )
42
- int fclose(FILE * ) nogil
42
+ int fclose(FILE * ) noexcept nogil
43
43
# size_t fread ( void *ptr, size_t size, size_t count, FILE *stream );
44
- size_t fread (void * , size_t, size_t, FILE * ) nogil
44
+ size_t fread (void * , size_t, size_t, FILE * ) noexcept nogil
45
45
46
46
47
47
def learn_inplace_binary_to_binary (binary_file_paths ,
@@ -78,7 +78,7 @@ def learn_inplace_binary_to_binary(binary_file_paths,
78
78
79
79
80
80
81
- cdef int is_element_of(unsigned int elem, unsigned int * arr, unsigned int size) nogil:
81
+ cdef int is_element_of(unsigned int elem, unsigned int * arr, unsigned int size) noexcept nogil:
82
82
cdef unsigned int ii
83
83
for ii in range (size):
84
84
if arr[ii] == elem:
@@ -94,7 +94,7 @@ cdef ErrorCode learn_inplace_binary_to_binary_ptr(char* binary_file_path,
94
94
unsigned int n_all_cues,
95
95
unsigned int * all_outcome_indices,
96
96
unsigned int start,
97
- unsigned int end) nogil:
97
+ unsigned int end) noexcept nogil:
98
98
99
99
100
100
cdef unsigned int number_of_events, number_of_cues, number_of_outcomes
@@ -178,7 +178,7 @@ cdef ErrorCode learn_inplace_binary_to_real_ptr(char* binary_file_path,
178
178
unsigned int n_all_cues,
179
179
unsigned int n_outcome_vector_dimensions,
180
180
unsigned int start,
181
- unsigned int end) nogil:
181
+ unsigned int end) noexcept nogil:
182
182
183
183
184
184
cdef unsigned int number_of_events, number_of_cues, number_of_outcomes
@@ -265,7 +265,7 @@ cdef ErrorCode learn_inplace_real_to_real_ptr(char* binary_file_path,
265
265
unsigned int n_cue_vector_dimensions,
266
266
unsigned int n_outcome_vector_dimensions,
267
267
unsigned int start,
268
- unsigned int end) nogil:
268
+ unsigned int end) noexcept nogil:
269
269
270
270
cdef unsigned int number_of_events, number_of_cues, number_of_outcomes
271
271
cdef dtype_t association_strength, update, summed_cue_vector_value, summed_outcome_vector_value
@@ -376,7 +376,7 @@ cdef ErrorCode learn_inplace_real_to_binary_ptr(char* binary_file_path,
376
376
dtype_t* weights,
377
377
unsigned int n_cue_vector_dimensions,
378
378
unsigned int start,
379
- unsigned int end) nogil:
379
+ unsigned int end) noexcept nogil:
380
380
381
381
cdef unsigned int number_of_events, number_of_cues, number_of_outcomes
382
382
cdef dtype_t association_strength, update, summed_cue_vector_value
0 commit comments