Questions tagged [numba]
Numba is an open source NumPy-aware optimizing compiler for Python.
numba
2,381
questions
0
votes
1
answer
91
views
Pixelwise least square in Python
I have a non-linear forward model which computes a gray scale image for a per-pixel parameter w. I am also able to invert the model using scipys optimize functions. The only problem I am having ...
1
vote
0
answers
49
views
Cannot determine Numba type of <class 'clr._internal.CLRMetatype'>
I am very new to CUDA...
I have written a module in .Net 6.0 and I need to scale up the execution time utilizing CUDA in a Ubuntu machine. The method I need to call is defined as:
namespace ...
-4
votes
0
answers
28
views
i getting a KeyError in numba but the Key exists [duplicate]
i getting KeyError in this code:
from numba import jit, cuda
import numpy as np
from timeit import default_timer as timer
@jit(target_backend='cuda')
def func2(a):
for ...
1
vote
1
answer
85
views
Numba indexing on Record type (structured array in numpy)
I have a numpy structured array and pass one element in it to a function as below.
from numba import njit
import numpy as np
dtype = np.dtype([
("id", "i4"), ("qtrnm0&...
0
votes
1
answer
53
views
GPU Not Computing using python
ACER Laptop with RTX3070. Installed CUDA, cuDNN, Tensorflow.
Tensorflow detecting GPU.
CUDA test script detecting GPU and shows GPU stats.
Trying to run this jit script to test GPU computing but ...
0
votes
1
answer
57
views
Efficient stochastic numerical integration over many trajectories
I am implementing a numerical method for solving stochastic differential equations using the Euler-Maruyama method.
What I have works, but it is not efficient. The reason is that because of the ...
1
vote
1
answer
57
views
My cumulative sum in numba cuda is giving the wrong results when using 1024 threads
I'm trying to implement a cumulative sum in numba cuda with parallel calculation. This function would take a 1-D array ( a = [1, 1, 1, 1]) and compute it so that each element of the array would be the ...
0
votes
0
answers
73
views
Parallel decorator on Numba routine featuring race condition
I have the following routine aiming to calculate in parallel different SVD of random matrices:
import numpy as np
from numba import jit,prange
@jit(nopython=True,parallel=True)
def svd_bn(aa,n):
...
1
vote
0
answers
21
views
Want to know the inernal mach of Numba JIT
From https://llvmlite.readthedocs.io/en/latest/user-guide/binding/examples.html, I made up the following code, aiming to understand the procedure of Numba JIT.
from __future__ import print_function
...
0
votes
1
answer
81
views
Creating a progress bar in python with Numba and Cuda
I'm running a parallel process using numba and CUDA (on windows) that will take quite a while. It would be nice to have an updating progress bar printed in the console, so I can see how far through ...
-2
votes
2
answers
85
views
How to make integration faster?
I'm using following code but it takes about an hour. Function chi and integrand are working fine, but chi_dop is taking too much time.
How to make it faster?
Any better way to integrate other than ...
0
votes
0
answers
50
views
Numba and Numpy Generator Methods & Thread Safety Documentation Clarification
The Numba documention for the Numpy Random module states:
The current Numba support for Generator is not thread-safe, hence we do not recommend using Generator methods in methods with parallel ...
0
votes
1
answer
19
views
Trouble using the right module version installed in pipenv environment
I'm trying to run some Python code in VS Code in an environment.
Step one. Open cmd from the folder containing the environment, activate the environment, and run VS code
then:
Seems like VS Code ...
2
votes
1
answer
96
views
How to speed up the interpolation for this particular example?
I made a script that performs tri-linear interpolation on a set of points using pandas for data handling and Numba for computational efficiency. Currently, it requires $\mathcal{O}(1) \text{ s}$ if ...
0
votes
0
answers
50
views
Why numba doesn't calculate after a number of index?
I wrote a simulation on what happens to earth's position if a rogue planet enters solar system, I used numba library for this. However while running the for loop numba library says the vectors are nan ...