Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23276

"Windows fatal exception: access violation" error on Numba Python

$
0
0

I am trying to use Numba parallel to parallelize a simple for loop. Surprisingly, I got a very strange error telling me this"Windows fatal exception: access violation".

Any idea what could be the issue?

from numba import njit, prange@njit(parallel =True)def function(x):    kk = []    for i in prange(len(x)):        kk.append([i, x[i]**10])    return kkb = np.random.rand(1000)%timeit function(b)

Here's the whole line of errors I received:

Windows fatal exception: code 0xc0000374Thread 0x00004548Windows fatal exception: code 0xc0000374 (most recent call first):  File "C:\Users\Kevin Yew\anaconda3\envs\py10\lib\site-packages\zmq\utils\garbage.py", line 49 in run  File "C:\Users\Kevin Yew\anaconda3\envs\py10\lib\threading.py", line 1009 in _bootstrap_inner  File "C:\Users\Kevin Yew\anaconda3\envs\py10\lib\threading.py", line 966 in _bootstrapMain thread:Thread 0x00001e38 (most recent call first):  File "<magic-timeit>", line 1 in inner  File "C:\Users\Kevin Yew\anaconda3\envs\py10\lib\site-packages\IPython\core\magics\execution.py", line 169 in timeit  File "C:\Users\Kevin Yew\anaconda3\envs\py10\lib\site-packages\IPython\core\magics\execution.py", line 1180 in timeit  File "C:\Users\Kevin Yew\anaconda3\envs\py10\lib\site-packages\IPython\core\magic.py", line 187 in <lambda>  File "C:\Users\Kevin Yew\anaconda3\envs\py10\lib\site-packages\decorator.py", line 232 in funRestarting kernel...

Viewing all articles
Browse latest Browse all 23276

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>