I’m trying to run this code.

```
import numpy as np
import time
from numba import vectorize, cuda,jit
@vectorize(['int64(int64)'],target='cuda')
def fact(n):
result = 1
for i in range(n):
result = result * i
return result
@vectorize(['float64(uint64)'], target='cuda')
def exp2(n):
res = 0.0
for i in range(0,n):
res = res + 1/fact(n)
return res
```

But it says

numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)

Untyped global name ‘fact’: cannot determine Numba type of <class ‘numba.cuda.dispatcher.CUDAUFuncDispatcher’>

How do I fix this?