numba

numba: Compile Numerical Python to Machine Code

Numba compiles numerically focused Python functions to machine code using LLVM, with support for many NumPy operations. It suits Python developers who need faster numerical workloads, loop parallelization, or GPU code generation without rewriting everything in a lower-level language.

PythonBSD-2-ClauseCompilerLibraryData Science
View on GitHub Compare
Stars
11.2k
Forks
1.3k
Stars, last 30 days
+34

Our take

Health score

67/100

How it is scored
Activity
73
Community
90
Issues
58
Pull requests
46

+34 stars in the last 30 days

  • Merges more pull requests than 82% of the projects we track
  • More contributors than 78% of the projects we track
  • Slower to merge pull requests than 89% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

11,216

Forks

1,357

Change since Nov 17, 2026: +2 stars·0 forks

Overview

Numba is a just-in-time compiler for numerical Python. It translates a supported subset of Python code into machine code through LLVM, helping speed up numerical functions while letting developers continue to write Python.

It is intended for workloads involving numerical computation and many NumPy operations. Its additional support for parallel loops and GPU code generation makes it useful when those execution options fit the workload.

Key Features

  • Just-in-time compilation of a subset of numerically focused Python.
  • LLVM-based machine-code generation.
  • Support for many NumPy functions.
  • Automatic parallelization of loops.
  • GPU-accelerated code generation.
  • Creation of ufuncs and C callbacks.

Use Cases

  • Python data scientists can compile numerical functions when Python execution is too slow for their workload.
  • NumPy users can accelerate supported operations while keeping their code in Python.
  • Developers with loop-heavy numerical tasks can explore automatic loop parallelization.
  • Teams with suitable GPU workloads can generate GPU-accelerated code from supported Python.
  • Python library authors can create ufuncs or C callbacks for numerical integrations.

Getting Started

Install Numba by following the installation instructions. See the documentation for usage details.

Alternatives

  • jax: JAX transforms and compiles numerical programs with automatic differentiation and vectorization, while Numba primarily compiles Python functions to machine code.
  • cupy: CuPy accelerates NumPy-style array operations on GPUs, while Numba compiles Python functions and can also generate GPU code.
ProjectLanguageLicenseStarsStatus
numbaPythonBSD-2-Clause11.2kNot checked yet
jaxPythonApache-2.036.4kActive
cupyPythonMIT12.4kActive

Considerations

  • Numba compiles a subset of Python, not arbitrary Python code. Confirm that the syntax and operations your workload needs are supported.
  • Its main focus is numerical code, including supported NumPy operations, so it is not a general-purpose accelerator for every Python program.
  • GPU code generation is available, but the input does not specify hardware requirements or supported GPU configurations. Consult the installation guide and documentation before planning a GPU deployment.

Found this useful?

Share it with someone who would like numba.

Comparisons