# Numba

**URL:** https://numba.discourse.group/c/numba/6.md?page=4

[Latest](https://numba.discourse.group/latest.md) · [Categories](https://numba.discourse.group/categories.md)

**Page:** 5

---

## [First class functions and structured arrays](https://numba.discourse.group/t/first-class-functions-and-structured-arrays/2872)

<div class="topic-metadata">

**Author:** [@adityagoel4512](https://numba.discourse.group/u/adityagoel4512)\
**Replies:** 3\
**Last updated:** [January 21, 2025, 11:02am UTC](https://numba.discourse.group/t/first-class-functions-and-structured-arrays/2872 "2025-01-21T11:02:00Z")

</div>

Hi all, I’m looking to take advantage of Numba’s support for first class functions (Types and signatures — Numba 0.52.0.dev0+274.g626b40e-py3.7-linux-x86\_64.egg documentation). Unfortunately I am running into an unimple…

---

## [Maximum digits int can have](https://numba.discourse.group/t/maximum-digits-int-can-have/2860)

<div class="topic-metadata">

**Author:** [@ps\_nithin](https://numba.discourse.group/u/ps_nithin)\
**Replies:** 8\
**Last updated:** [January 12, 2025, 7:34am UTC](https://numba.discourse.group/t/maximum-digits-int-can-have/2860 "2025-01-12T07:34:58Z")

</div>

Hi, What is the maximum no of digits a numba python integer can have inside a cuda kernel. I need to handle max digits of 0s and 1s possible. When i was using pow(10,x) where x is very large i get wierd numbers. Whats h…

---

## [Numba 0.60.0 requires numpy\<2.1,\>=1.22, but you have numpy 2.2.1 which is incompatible](https://numba.discourse.group/t/numba-0-60-0-requires-numpy-2-1-1-22-but-you-have-numpy-2-2-1-which-is-incompatible/2866)

<div class="topic-metadata">

**Author:** [@erberj](https://numba.discourse.group/u/erberj)\
**Replies:** 1\
**Last updated:** [January 11, 2025, 4:38pm UTC](https://numba.discourse.group/t/numba-0-60-0-requires-numpy-2-1-1-22-but-you-have-numpy-2-2-1-which-is-incompatible/2866 "2025-01-11T16:38:36Z")

</div>

Hi, Numba blocks me from using new versions of numpy. When can an update be expected? Best regards Jakob Windows 11 Python 3.11

---

## [Jitclass Inheritance from a non-jitclass](https://numba.discourse.group/t/jitclass-inheritance-from-a-non-jitclass/2863)

<div class="topic-metadata">

**Author:** [@akakzia](https://numba.discourse.group/u/akakzia)\
**Replies:** 0\
**Last updated:** [January 10, 2025, 9:59am UTC](https://numba.discourse.group/t/jitclass-inheritance-from-a-non-jitclass/2863 "2025-01-10T09:59:29Z")

</div>

I have a jitclass that inherits from a non jitclass. I was wondering if the child jitclass’s methods that are defined in the parent class would be automatically jit compiled (even though the parent class is not a jitclas…

---

## [How do I dynamically call a function?](https://numba.discourse.group/t/how-do-i-dynamically-call-a-function/2701)

<div class="topic-metadata">

**Author:** [@yangeorget](https://numba.discourse.group/u/yangeorget)\
**Replies:** 15\
**Last updated:** [January 5, 2025, 12:46pm UTC](https://numba.discourse.group/t/how-do-i-dynamically-call-a-function/2701 "2025-01-05T12:46:03Z")

</div>

Hello, I’d like to dynamically call a function based on an integer (fct\_selector here). I have several Python modules, each has a different compute function. FCT\_MODULES = \[ a\_first\_module, a\_second\_module, … \] @…

---

## [Problem using parallel=True and prange](https://numba.discourse.group/t/problem-using-parallel-true-and-prange/2854)

<div class="topic-metadata">

**Author:** [@FelipeRM](https://numba.discourse.group/u/FelipeRM)\
**Replies:** 3\
**Last updated:** [January 4, 2025, 2:35pm UTC](https://numba.discourse.group/t/problem-using-parallel-true-and-prange/2854 "2025-01-04T14:35:42Z")

</div>

Hi, I am trying to use Numba to improve the performance of my code. I have implemented an algorithm that executes in 420 seconds. The algorithm is embarrassingly parallel, but when I embed it inside a function decorated …

---

## [Understanding Functiong Caching](https://numba.discourse.group/t/understanding-functiong-caching/2852)

<div class="topic-metadata">

**Author:** [@seanlaw](https://numba.discourse.group/u/seanlaw)\
**Replies:** 3\
**Last updated:** [January 3, 2025, 4:07am UTC](https://numba.discourse.group/t/understanding-functiong-caching/2852 "2025-01-03T04:07:50Z")

</div>

I have a simple numba example where I Define a numba function Enable caching via enable\_caching() (instead of cache=True) Call the function Print the contents of the cache directory rom numba import njit from os impor…

---

## [Performance is comparable between two different numba cuda approaches](https://numba.discourse.group/t/performance-is-comparable-between-two-different-numba-cuda-approaches/2848)

<div class="topic-metadata">

**Author:** [@myociss](https://numba.discourse.group/u/myociss)\
**Replies:** 6\
**Last updated:** [December 31, 2024, 1:30pm UTC](https://numba.discourse.group/t/performance-is-comparable-between-two-different-numba-cuda-approaches/2848 "2024-12-31T13:30:53Z")

</div>

I am implementing a ray tracer using numba cuda and trying to optimize the performance since I have tons of frames to trace. Two approaches are taking about the same amount of time even though it seems that one should be…

---

## [How to declare an array of enum values that is compatible with numba?](https://numba.discourse.group/t/how-to-declare-an-array-of-enum-values-that-is-compatible-with-numba/2841)

<div class="topic-metadata">

**Author:** [@blackears](https://numba.discourse.group/u/blackears)\
**Replies:** 2\
**Last updated:** [December 18, 2024, 5:38pm UTC](https://numba.discourse.group/t/how-to-declare-an-array-of-enum-values-that-is-compatible-with-numba/2841 "2024-12-18T17:38:34Z")

</div>

I’m new to numba and trying to numbafy an existing python script to hopefully make it run faster. I’m declaring an array that I want to pass to the constructor of my CheckerBoardState class, but it’s being rejected beca…

---

## [Bodo: JIT and HPC-based compute engine for Python data processing](https://numba.discourse.group/t/bodo-jit-and-hpc-based-compute-engine-for-python-data-processing/2842)

<div class="topic-metadata">

**Author:** [@ehsantn](https://numba.discourse.group/u/ehsantn)\
**Replies:** 0\
**Last updated:** [December 16, 2024, 10:37pm UTC](https://numba.discourse.group/t/bodo-jit-and-hpc-based-compute-engine-for-python-data-processing/2842 "2024-12-16T22:37:46Z")

</div>

Bodo is a JIT compiler (based on Numba) and HPC-based compute engine for large-scale data processing in native Python (using Pandas/Numpy). It’s a lot easier and 20-240x faster than others like Spark, Dask, and Ray (see …

---

## [Numba cant run on both windows and macos. How so solve](https://numba.discourse.group/t/numba-cant-run-on-both-windows-and-macos-how-so-solve/2839)

<div class="topic-metadata">

**Author:** [@hvdveer](https://numba.discourse.group/u/hvdveer)\
**Replies:** 3\
**Last updated:** [December 13, 2024, 10:14am UTC](https://numba.discourse.group/t/numba-cant-run-on-both-windows-and-macos-how-so-solve/2839 "2024-12-13T10:14:29Z")

</div>

I work on a Macbook with Apple silicon, but most of my colleagues work on windows. If I run numba I get a type error for int32. This can be resolved by changing them to int64, but then my colleagues get an Type error for…

---

## [Numba + np.linalg.eigvalsh + parallel=True does show worse efficiency](https://numba.discourse.group/t/numba-np-linalg-eigvalsh-parallel-true-does-show-worse-efficiency/2835)

<div class="topic-metadata">

**Author:** [@SHF101202021](https://numba.discourse.group/u/SHF101202021)\
**Replies:** 1\
**Last updated:** [December 9, 2024, 6:17am UTC](https://numba.discourse.group/t/numba-np-linalg-eigvalsh-parallel-true-does-show-worse-efficiency/2835 "2024-12-09T06:17:51Z")

</div>

Problem Statement To solve eigenvalue problems per frequency point, I try to use numba parallel to accelerate np.linalg.eigvalsh. But, I found numba doesnot provide much high superiority. For example: n\_freq=2048, n\_p…

---

## [AOT vs llvmlite.dll](https://numba.discourse.group/t/aot-vs-llvmlite-dll/2834)

<div class="topic-metadata">

**Author:** [@nb113](https://numba.discourse.group/u/nb113)\
**Replies:** 8\
**Last updated:** [December 8, 2024, 7:49pm UTC](https://numba.discourse.group/t/aot-vs-llvmlite-dll/2834 "2024-12-08T19:49:16Z")

</div>

Hi, I have converted a few functions successfully to @njit, it took some finessing, but everything works. Problem is that when building the py app and bundling into a single executable file, the llvmlite.dll needed to …

---

## [How to build complex data structures with working JIT cache?](https://numba.discourse.group/t/how-to-build-complex-data-structures-with-working-jit-cache/2824)

<div class="topic-metadata">

**Author:** [@hexagonal](https://numba.discourse.group/u/hexagonal)\
**Replies:** 13\
**Last updated:** [December 8, 2024, 3:20am UTC](https://numba.discourse.group/t/how-to-build-complex-data-structures-with-working-jit-cache/2824 "2024-12-08T03:20:57Z")

</div>

Hi dear friends! Simple functions in Numba work excellently and very fast — as long as everything boils down to processing NumPy arrays. But I’m developing a schedule optimizer for production, and need more complex dat…

---

## [Numba in a class: TypingError: non-precise type pyobject](https://numba.discourse.group/t/numba-in-a-class-typingerror-non-precise-type-pyobject/2833)

<div class="topic-metadata">

**Author:** [@paul18fr](https://numba.discourse.group/u/paul18fr)\
**Replies:** 4\
**Last updated:** [December 8, 2024, 1:39am UTC](https://numba.discourse.group/t/numba-in-a-class-typingerror-non-precise-type-pyobject/2833 "2024-12-08T01:39:34Z")

</div>

Hi, I’m trying to run the following snippet using numba; some aspects might be clumsy but I do not understand how to specify a type to numba. What am i missing? Thanks paul from numba import jit, prange import numpy …

---

## [How does mangling\_args work for types with parameters](https://numba.discourse.group/t/how-does-mangling-args-work-for-types-with-parameters/1054)

<div class="topic-metadata">

**Author:** [@njriasan](https://numba.discourse.group/u/njriasan)\
**Replies:** 2\
**Last updated:** [December 7, 2024, 5:01pm UTC](https://numba.discourse.group/t/how-does-mangling-args-work-for-types-with-parameters/1054 "2024-12-07T17:01:00Z")

</div>

Hello Numba developers. I’m hoping to get an explanation of how mangling\_args works for types with parameters. I have a Numba class that depends on parameters which I’m currently just putting in the name. However, becaus…

---

## [Pass list of DIFFERENT jitclasses or jitclass methods to a jit'ed function](https://numba.discourse.group/t/pass-list-of-different-jitclasses-or-jitclass-methods-to-a-jited-function/2818)

<div class="topic-metadata">

**Author:** [@lyxicon](https://numba.discourse.group/u/lyxicon)\
**Replies:** 6\
**Last updated:** [December 6, 2024, 7:15pm UTC](https://numba.discourse.group/t/pass-list-of-different-jitclasses-or-jitclass-methods-to-a-jited-function/2818 "2024-12-06T19:15:50Z")

</div>

I am trying make a jitted function which takes a list of instances of different jitclasses, or a method of these jitclasses so it can call these methods in a chain. I found the threads below, but they all fall short: T…

---

## [Mangler memory characteristics](https://numba.discourse.group/t/mangler-memory-characteristics/2826)

<div class="topic-metadata">

**Author:** [@nelson2005](https://numba.discourse.group/u/nelson2005)\
**Replies:** 2\
**Last updated:** [December 5, 2024, 6:20pm UTC](https://numba.discourse.group/t/mangler-memory-characteristics/2826 "2024-12-05T18:20:56Z")

</div>

Windows 10 Numba 0.56.4 I’ve observed significant memory and disk usage that may be related to mangling. We see mangled type strings that are ~500kB in size and they seem to appear at least ten times in the llvm code,…

---

## [How to dump optimized IR?](https://numba.discourse.group/t/how-to-dump-optimized-ir/2812)

<div class="topic-metadata">

**Author:** [@wearone](https://numba.discourse.group/u/wearone)\
**Replies:** 5\
**Last updated:** [November 30, 2024, 11:54am UTC](https://numba.discourse.group/t/how-to-dump-optimized-ir/2812 "2024-11-30T11:54:34Z")

</div>

I have a simple python function with an unused intermediate variable. How can I dump optimized IR? which shows the unused variable being removed. NUMBA\_DUMP\_IR=1 only shows non-optimized IR. Additionally, can I turn off…

---

## [ValueError: The number of threads must be between 1 and %s](https://numba.discourse.group/t/valueerror-the-number-of-threads-must-be-between-1-and-s/2792)

<div class="topic-metadata">

**Author:** [@jeiglsperger](https://numba.discourse.group/u/jeiglsperger)\
**Replies:** 3\
**Last updated:** [November 26, 2024, 10:11pm UTC](https://numba.discourse.group/t/valueerror-the-number-of-threads-must-be-between-1-and-s/2792 "2024-11-26T22:11:48Z")

</div>

I wanted to ask the community of someone also already encountered the error message from the title. I do not quite understand it. I receive this error when I run some code within a Docker container on one of our servers,…

---

## [Scipy.sparse.linalg.splu, solve function acceleration](https://numba.discourse.group/t/scipy-sparse-linalg-splu-solve-function-acceleration/2805)

<div class="topic-metadata">

**Author:** [@agedone12](https://numba.discourse.group/u/agedone12)\
**Replies:** 0\
**Last updated:** [November 22, 2024, 10:07pm UTC](https://numba.discourse.group/t/scipy-sparse-linalg-splu-solve-function-acceleration/2805 "2024-11-22T22:07:43Z")

</div>

Hi, I am new to using numba for linear algibra operations. I recently started looking into a problem where I have to invert matrix once (so I use scipy.sparse.linalg.splu) and then solve multiple rhs values. In the solv…

---

## [Meeting minutes](https://numba.discourse.group/t/meeting-minutes/2803)

<div class="topic-metadata">

**Author:** [@ErolBa](https://numba.discourse.group/u/ErolBa)\
**Replies:** 0\
**Last updated:** [November 22, 2024, 9:06am UTC](https://numba.discourse.group/t/meeting-minutes/2803 "2024-11-22T09:06:38Z")

</div>

Hi, I noticed that the meeting minutes haven’t been uploaded for a month or so. It would be great if someone could upload these at some point? Thanks a lot.

---

## [Understanding memory usage of a kernel](https://numba.discourse.group/t/understanding-memory-usage-of-a-kernel/2790)

<div class="topic-metadata">

**Author:** [@marcelosena](https://numba.discourse.group/u/marcelosena)\
**Replies:** 2\
**Last updated:** [November 18, 2024, 8:58am UTC](https://numba.discourse.group/t/understanding-memory-usage-of-a-kernel/2790 "2024-11-18T08:58:54Z")

</div>

Hi I am trying to understand the measurement of memory usage in Numba. I am allocating here an array with 10^9 float 32 numbers, which I expect to allocate 4gb of memory. However, when trying to measure the allocation…

---

## [A\[:, \[1\]\] not supported where A\[:, 1:1+1\] is](https://numba.discourse.group/t/a-1-not-supported-where-a-1-1-1-is/2788)

<div class="topic-metadata">

**Author:** [@lesshaste](https://numba.discourse.group/u/lesshaste)\
**Replies:** 3\
**Last updated:** [November 10, 2024, 2:17pm UTC](https://numba.discourse.group/t/a-1-not-supported-where-a-1-1-1-is/2788 "2024-11-10T14:17:39Z")

</div>

The following numpy code is not supported in numba. @nb.njit def foo(A): return A\[:, \[1\]\] A = np.ones((3, 3)) foo(A) However it is supported if we use: @nb.njit def foo(A): return A\[:, 1:1+1\] There is an iss…

---

## [NUCS a Numpy and Numba powered constraint solver](https://numba.discourse.group/t/nucs-a-numpy-and-numba-powered-constraint-solver/2724)

<div class="topic-metadata">

**Author:** [@yangeorget](https://numba.discourse.group/u/yangeorget)\
**Replies:** 1\
**Last updated:** [November 5, 2024, 7:33am UTC](https://numba.discourse.group/t/nucs-a-numpy-and-numba-powered-constraint-solver/2724 "2024-11-05T07:33:22Z")

</div>

Hello, Sorry for the spam : I repost here because it was initially posted in the wrong category. NUCS is a fast constraint solver in Python using Numpy and Numba: GitHub - yangeorget/nucs: NUCS is a Python library for …

---

## [Best Practices Adopting Numpy Based Code for Compatibility/Performance with Numba](https://numba.discourse.group/t/best-practices-adopting-numpy-based-code-for-compatibility-performance-with-numba/2780)

<div class="topic-metadata">

**Author:** [@nb113](https://numba.discourse.group/u/nb113)\
**Replies:** 12\
**Last updated:** [November 2, 2024, 11:10pm UTC](https://numba.discourse.group/t/best-practices-adopting-numpy-based-code-for-compatibility-performance-with-numba/2780 "2024-11-02T23:10:37Z")

</div>

Hello, this is my tech stack: Py: 3.10.2 Numpy: 2.0.2 or 1.26.4 Numba: 0.60.0 (latest) I have a standard Py class with a few class methods that heavily uses numpy. The class does the following: (1) it receives a se…

---

## [Unrecognized options: {'cashe'}](https://numba.discourse.group/t/unrecognized-options-cashe/2779)

<div class="topic-metadata">

**Author:** [@FtNN](https://numba.discourse.group/u/FtNN)\
**Replies:** 1\
**Last updated:** [October 29, 2024, 12:39pm UTC](https://numba.discourse.group/t/unrecognized-options-cashe/2779 "2024-10-29T12:39:29Z")

</div>

numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) Failed in nopython mode pipeline (step: nopython frontend) Internal error at \<numba.core.typeinfer.CallConstraint object at 0x0…

---

## [Calling functions from a function list/array inside a numba cuda kernel](https://numba.discourse.group/t/calling-functions-from-a-function-list-array-inside-a-numba-cuda-kernel/2776)

<div class="topic-metadata">

**Author:** [@Stoney](https://numba.discourse.group/u/Stoney)\
**Replies:** 2\
**Last updated:** [October 29, 2024, 7:27am UTC](https://numba.discourse.group/t/calling-functions-from-a-function-list-array-inside-a-numba-cuda-kernel/2776 "2024-10-29T07:27:13Z")

</div>

I have the problem that needs to be addressed by calling huge amounts of different functions, and eventually even combinations of them. I have quite some experience in writing numba cuda kernels, and I want to solve thi…

---

## [Simple Dict implementation does not seem to work](https://numba.discourse.group/t/simple-dict-implementation-does-not-seem-to-work/2768)

<div class="topic-metadata">

**Author:** [@supracharger](https://numba.discourse.group/u/supracharger)\
**Replies:** 1\
**Last updated:** [October 24, 2024, 1:08am UTC](https://numba.discourse.group/t/simple-dict-implementation-does-not-seem-to-work/2768 "2024-10-24T01:08:28Z")

</div>

Here is the code: @jit(nopython=True, debug=True) def Sum(unique, values): D0 = {} for i in range(len(unique)): D0\[unique\[i\]\] = 0 ls = np.array(\[0, 1, 2\], dtype=np.int64) Sum(ls, ls) Could you please t…

---

## [No implementation of function Function(\<function full at 0x000002D6FE85E5C0\>) found for signature: \>\>\> full(Tuple(Literal\[int\](3), Literal\[int\](5), Literal\[int\](10)), array(int64, 3d, A))](https://numba.discourse.group/t/no-implementation-of-function-function-function-full-at-0x000002d6fe85e5c0-found-for-signature-full-tuple-literal-int-3-literal-int-5-literal-int-10-array-int64-3d-a/2764)

<div class="topic-metadata">

**Author:** [@Akiba275](https://numba.discourse.group/u/Akiba275)\
**Replies:** 1\
**Last updated:** [October 21, 2024, 2:13am UTC](https://numba.discourse.group/t/no-implementation-of-function-function-function-full-at-0x000002d6fe85e5c0-found-for-signature-full-tuple-literal-int-3-literal-int-5-literal-int-10-array-int64-3d-a/2764 "2024-10-21T02:13:23Z")

</div>

I was trying to combine several 1-d arrays into a 2-d array, and then expand it into a 3-d array of the specified shape, and I ran into this problem. The program works fine without the njit decorator. This problem can b…

[Previous page](https://numba.discourse.group/c/numba/6.md?page=3)

[Next page](https://numba.discourse.group/c/numba/6.md?page=5)
