8000 Merge pull request #6721 from gerritholl/circumvent-cython-problem-lo… · numpy/numpy@e711c95 · GitHub
[go: up one dir, main page]

Skip to content

Commit e711c95

Browse files
committed
Merge pull request #6721 from gerritholl/circumvent-cython-problem-locally
BUG: Fix for #6719
2 parents d94043f + 4e276ac commit e711c95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

numpy/random/mtrand/mtrand.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ cdef extern from "initarray.h":
127127
# Initialize numpy
128128
import_array()
129129
130+
cimport cython
130131
import numpy as np
131132
import operator
132133
import warnings
@@ -4484,7 +4485,7 @@ cdef class RandomState:
44844485
mnarr = <ndarray>multin
44854486
mnix = <long*>PyArray_DATA(mnarr)
44864487
sz = PyArray_SIZE(mnarr)
4487-
with self.lock, nogil:
4488+
with self.lock, nogil, cython.cdivision(True):
44884489
i = 0
44894490
while i < sz:
44904491
Sum = 1.0

0 commit comments

Comments
 (0)
0