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.1.tar.gz (66.8 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.1-py3-none-any.whl (66.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: numba_lapack-0.1.1.tar.gz
  • Upload date:
  • Size: 66.8 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.1.tar.gz
Algorithm Hash digest
SHA256 1e39b10e368f1afda0b545ef9701e1a0a441defcb409328198ec60b809de5151
MD5 a5d6752bb05b97a42d6674dfb8eae39a
BLAKE2b-256 8484596448fe43e1ad3382b7338675e88699bdf9ef009176a793b98aef14876f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: numba_lapack-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 66.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 780feff90036ace392b346c92f72b2b0bd03c5b1c28bc0f0caad66c92c6af46e
MD5 ff5be6ba8a59285c7a633bef1bdcb6ec
BLAKE2b-256 c5dbda241e88bd480cbeb36dd7adaaf0d9f80bfdde74c24ed68ed3a97bf8cef1

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