numba Questions

9

I am trying to install numba for python but after following the instruction from the homepage I got this error that the extension_types page can not be found. I would very appreciate if someone k...
Pericline asked 29/1, 2013 at 14:47

1

Solved

I have been experimenting with various options to speed up some for-loop-heavy-logic in PyTorch. The two obvious options to do so are either using numba or writing a custom C++ extension. As an exa...
Markle asked 27/2, 2023 at 13:2

1

Solved

I originally had some code that operates on very large arrays using for loops. I wanted to see if I can speed it up with numpy and numba and tried 4 incremental steps to get it faster. Setup: from ...
Menam asked 31/5, 2024 at 7:0

9

My Dockerfile using a pypy base fails with FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config' when installing llvmlite, a dependency of numba which is listed in my requirements.t...
Bloodyminded asked 12/10, 2019 at 10:49

2

Solved

Is it possible to use line_profiler with Numba? Calling %lprun on a function decorated with @numba.jit returns an empty profile: Timer unit: 1e-06 s Total time: 0 s File: <ipython-input-29-48...
Subsistence asked 6/2, 2019 at 1:34

1

Solved

Inside numba .jit(nopython=True) function i am calculating thousands of numpy arrays (1-D, integer data type) and append them to the list. The problem is that some of the arrays appears equal, but ...
Glarum asked 2/7, 2019 at 6:40

2

I have a DataFrame with 1,500,000 rows. It's one-minute level stock market data that I bought from QuantQuote.com. (Open, High, Low, Close, Volume). I'm trying to run some home-made backtests of st...
Montagnard asked 13/5, 2014 at 11:35

1

I am interested in the performance of numba when using dicts. I did the following experiment: from numpy.random import randint import numba as nb @nb.njit def foo_numba(a, b, c): N = 100**2 d = ...
Birchfield asked 14/12, 2023 at 16:14

4

Solved

I want to pass a datetime array to a Numba function (which cannot be vectorised and would otherwise be very slow). I understand Numba supports numpy.datetime64. However, it seems it supports dateti...
Palladio asked 10/8, 2015 at 11:7

1

Solved

Disclaimer The question is part of a thread including those two SO questions (q1, q2) The data resemble movie ratings from the ratings.csv file (~891mb) of ml-latest dataset. Once I read the csv fi...
Chaffee asked 3/12, 2023 at 11:9

4

Solved

Python 3.10 on Mac running OS 11.6.1 I uninstalled Python 3.9 from my machine and upgraded to version 3.10. No problems installing standard packages such as pandas, scipy, etc. However one package,...
Pabulum asked 5/1, 2022 at 15:28

5

Solved

In a program I am working on, I need to multiply two matrices repeatedly. Because of the size of one of the matrices, this operation takes some time and I wanted to see which method would be the mo...
Metalware asked 10/4, 2016 at 6:39

2

Solved

I have this simple python/numba code: from numba import njit import numba as nb @nb.njit(nb.uint64(nb.uint64)) def popcount(x): b=0 while(x > 0): x &= x - nb.uint64(1) b+=1 return b @...
Garret asked 14/9, 2023 at 11:36

1

Solved

I am using numba 0.57.1 and I would like to exploit the native CPU popcount in my code. My existing code is too slow as I need to run it hundreds of millions of times. Here is a MWE: import numba a...
Crescendo asked 14/9, 2023 at 8:0

6

Solved

I have a problem with installing llvmlite, which is need for installing Numba. I searched for answers to my problem, but nothing is working. The command I used to install numba and llvmlite: pip in...
Emersion asked 19/1, 2021 at 19:36

5

Solved

I am running a @nb.njit function within which I am trying to put an integer within a string array. import numpy as np import numba as nb @nb.njit(nogil=True) def func(): my_array = np.empty(6, d...
Rie asked 25/10, 2019 at 6:0

1

Solved

I am trying to solve a lot of linear equations as fast as possible. To find out the fastest way I benchmarked NumPy and PyTorch, each on the CPU and on my GeForce 1080 GPU (using Numba for NumPy). ...
Matelote asked 30/5, 2020 at 8:38

2

I have a simple loop that just sums the second row of a numpy array. In numba I need only do: from numba import njit @njit('float64(float64[:, ::1])', fastmath=True) def fast_sum_nb(array_2d): s ...
Poser asked 5/6, 2023 at 14:5

2

Solved

The code is here: import numba as nb import numpy as np @nb.njit def func(size): ary = np.array([np.arange(size),np.arange(size)+1,np.arange(size)-1]).T X = np.array([ary[1:,0] - ary[:-1,2], a...
Strader asked 20/12, 2018 at 0:48

4

Solved

I am new to Numba and I need to use Numba to speed up some Pytorch functions. But I find even a very simple function does not work :( import torch import numba @numba.njit() def vec_add_odd_pos(a,...
Pharr asked 30/7, 2020 at 9:1

3

Solved

I have a fairly large codebase written in numba, and I have noticed that when the cache is enabled for a function calling another numba compiled function in another file, changes in the called func...
Steno asked 23/5, 2017 at 10:3

2

Solved

Why is np.dot so much faster than np.sum? Following this answer we know that np.sum is slow and has faster alternatives. For example: In [20]: A = np.random.rand(1000) In [21]: B = np.random.rand(...
Lottielotto asked 24/2, 2023 at 11:48

1

Problem I have written a code that takes some historical data as input. Assuming dataset has a timeseries format, I am trying to do a regression and find a predictor. Code For my project, I have fo...
Drain asked 21/1, 2023 at 2:47

5

I am trying to create a new column in a dataframe based on pairs of information and its previous values. Although the code that I run is correct, and gives the results I need, it is very slow when ...
Segal asked 12/2, 2020 at 18:38

2

Solved

I tried to run the code using CUDA, I got this error, it seems something wrong in the system the full code: I got it CUDACast #10a - Your First CUDA Python Program and no module named numbapro im...
Sanitarian asked 25/10, 2019 at 5:28

© 2022 - 2025 — McMap. All rights reserved.