Skip to content

Numba

作者:Lee 等
最后更新:

Introduction

Automatically compile Python functions into high-performance machine code using @jit or @njit .

Installation

bash
pip install numba

Usage Example

python
from numba import njit

@njit
def add(a, b):
    return a + b

print(add(1, 2))  # Output: 3

页面历史