diff options
author | Ulrich Seidl <Ulrich.Seidl@muneda.com> | 2014-09-30 09:30:56 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-09-30 19:19:40 +0200 |
commit | 7fc3227aa3f417b927769046a96b4f625550ab5d (patch) | |
tree | 91238652452b67aff2ed8442ac154a6a5966af6f | |
parent | 3b579f7046a0751a1b1976390ece5ba8603b8585 (diff) | |
download | numpy-7fc3227aa3f417b927769046a96b4f625550ab5d.tar.gz |
BUG: ImportError: No module named thread
Fixes #5136. Import dummy_threading if importing threading fails.
-rw-r--r-- | numpy/random/mtrand/mtrand.pyx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx index c2603543d..748683cc3 100644 --- a/numpy/random/mtrand/mtrand.pyx +++ b/numpy/random/mtrand/mtrand.pyx @@ -127,7 +127,10 @@ import_array() import numpy as np import operator import warnings -from threading import Lock +try: + from threading import Lock +except ImportError: + from dummy_threading import Lock cdef object cont0_array(rk_state *state, rk_cont0 func, object size, object lock): |