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

Uploaded Python 3

File details

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

File metadata

  • Download URL: numba_lapack-0.1.0.tar.gz
  • Upload date:
  • Size: 59.4 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.0.tar.gz
Algorithm Hash digest
SHA256 8d1a592fc87b53f0e7bdf0a622b024174c62d32a75f3e8f9e5ace01d8c241485
MD5 6c960ae55110da158be43fa106629bcf
BLAKE2b-256 8b5012aecd968c2146f03221ab6af99e8dc36bc007abb711512988d2a8c8d906

See more details on using hashes here.

File details

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

File metadata

  • Download URL: numba_lapack-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6167c229710ff0ddc070b4ef28adcd64a6df3b03f93efb3cf24fda27d6cb0605
MD5 856469a7d3e6ebaa0c99bb841286bac2
BLAKE2b-256 910c7d76bf2a4942aa24f7e8d0bd0d2855c650064b1be0004804fb80e6e7f150

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