Skip to main content

UNSAFE Numba intrinsics for BLAS/LAPACK via SciPy C-API

Project description

numba-lapack

numba-lapack

UNSAFE, zero-overhead Numba intrinsics that expose the full BLAS/LAPACK C-APIs via SciPy’s __pyx_capi__. Call BLAS/LAPACK directly from @njit in nopython mode.

⚠️ Unsafe means unsafe: raw pointer semantics; you are responsible for valid pointers, shapes, and leading dimensions.

Highlights

  • Auto-discovers scipy.linalg.cython_blas and cython_lapack symbols at import.
  • Generates Numba @intrinsic wrappers with the exact ABI (no Python overhead).
  • Accepts arrays, typed pointers, or by-ref scalars for pointer parameters.
  • Ships type stubs so IDEs can see function names & arg docs.

Quick start

import numpy as np
from numba import njit
from numba_lapack import dgemm

@njit(cache=True)
def gemm_nn(A, B, C, alpha, beta):
    m, k = A.shape
    _, n = B.shape
    dgemm(np.uint8(ord('N')), np.uint8(ord('N')),
          m, n, k, alpha, A, m, B, k, beta, C, m)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numba_lapack-0.1.2.tar.gz (66.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numba_lapack-0.1.2-py3-none-any.whl (66.7 kB view details)

Uploaded Python 3

File details

Details for the file numba_lapack-0.1.2.tar.gz.

File metadata

  • Download URL: numba_lapack-0.1.2.tar.gz
  • Upload date:
  • Size: 66.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for numba_lapack-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4126c6ec0db91c405e625af79021a8c2c7497a68f7d337d8c4dc8b8265221b03
MD5 4f61032fe46c5bb4c46206ee74466c39
BLAKE2b-256 a3d064d12f52b65d49efb7819cca1d7f9604a1fecc44c44b33fbba5a0d3d33a5

See more details on using hashes here.

File details

Details for the file numba_lapack-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: numba_lapack-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 66.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for numba_lapack-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e64d1edd8c5773024e8640ea9caa1cccb01f4611fa472e5d37f751f27e4f2dc4
MD5 8870725a933fc476b70d7c9b35d004bc
BLAKE2b-256 7bfaa89e8b3aa86754441952d66672ced44232d18d3e40030956cad2107a11dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page