diff options
author | Thomas A Caswell <tcaswell@gmail.com> | 2023-05-13 21:33:45 -0400 |
---|---|---|
committer | Thomas A Caswell <tcaswell@gmail.com> | 2023-05-13 21:33:45 -0400 |
commit | 888fd7719965719321f160f79051aa5caf42b9ac (patch) | |
tree | 446a39e18f94388a3057c1d4b86535af93f4bdd4 /numpy/random/_pcg64.pyx | |
parent | 7cc7254a47c95d32c39010554d7c845ff26e7518 (diff) | |
download | numpy-888fd7719965719321f160f79051aa5caf42b9ac.tar.gz |
MNT: compatibility with cython3
This is fallout from https://github.com/cython/cython/pull/5386
Diffstat (limited to 'numpy/random/_pcg64.pyx')
-rw-r--r-- | numpy/random/_pcg64.pyx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/numpy/random/_pcg64.pyx b/numpy/random/_pcg64.pyx index dee38c039..f7891aa85 100644 --- a/numpy/random/_pcg64.pyx +++ b/numpy/random/_pcg64.pyx @@ -26,8 +26,8 @@ cdef extern from "src/pcg64/pcg64.h": void pcg64_get_state(pcg64_state *state, uint64_t *state_arr, int *has_uint32, uint32_t *uinteger) void pcg64_set_state(pcg64_state *state, uint64_t *state_arr, int has_uint32, uint32_t uinteger) - uint64_t pcg64_cm_next64(pcg64_state *state) nogil - uint32_t pcg64_cm_next32(pcg64_state *state) nogil + uint64_t pcg64_cm_next64(pcg64_state *state) noexcept nogil + uint32_t pcg64_cm_next32(pcg64_state *state) noexcept nogil void pcg64_cm_advance(pcg64_state *state, uint64_t *step) cdef uint64_t pcg64_uint64(void* st) noexcept nogil: @@ -39,13 +39,13 @@ cdef uint32_t pcg64_uint32(void *st) noexcept nogil: cdef double pcg64_double(void* st) noexcept nogil: return uint64_to_double(pcg64_next64(<pcg64_state *>st)) -cdef uint64_t pcg64_cm_uint64(void* st) nogil: +cdef uint64_t pcg64_cm_uint64(void* st) noexcept nogil: return pcg64_cm_next64(<pcg64_state *>st) -cdef uint32_t pcg64_cm_uint32(void *st) nogil: +cdef uint32_t pcg64_cm_uint32(void *st) noexcept nogil: return pcg64_cm_next32(<pcg64_state *> st) -cdef double pcg64_cm_double(void* st) nogil: +cdef double pcg64_cm_double(void* st) noexcept nogil: return uint64_to_double(pcg64_cm_next64(<pcg64_state *>st)) cdef class PCG64(BitGenerator): @@ -515,4 +515,3 @@ cdef class PCG64DXSM(BitGenerator): pcg64_cm_advance(&self.rng_state, <uint64_t *>np.PyArray_DATA(d)) self._reset_state_variables() return self - |