diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-11-25 11:53:45 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-11-25 11:53:45 -0700 |
commit | e711c9589ea60ac6ca78096906760925a9e216e3 (patch) | |
tree | 100b7ab8d3228024f153b7f118062ff7758d2cd2 | |
parent | d94043f0fb93985fd4302eae9fcdca2d79239908 (diff) | |
parent | 4e276acb5b5081ac9b5f54f1d0a60bf3473572b5 (diff) | |
download | numpy-e711c9589ea60ac6ca78096906760925a9e216e3.tar.gz |
Merge pull request #6721 from gerritholl/circumvent-cython-problem-locally
BUG: Fix for #6719
-rw-r--r-- | numpy/random/mtrand/mtrand.pyx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx index f8ae8d71b..080591e5e 100644 --- a/numpy/random/mtrand/mtrand.pyx +++ b/numpy/random/mtrand/mtrand.pyx @@ -127,6 +127,7 @@ cdef extern from "initarray.h": # Initialize numpy import_array() +cimport cython import numpy as np import operator import warnings @@ -4484,7 +4485,7 @@ cdef class RandomState: mnarr = <ndarray>multin mnix = <long*>PyArray_DATA(mnarr) sz = PyArray_SIZE(mnarr) - with self.lock, nogil: + with self.lock, nogil, cython.cdivision(True): i = 0 while i < sz: Sum = 1.0 |