Skip to main content

Python wrapper for KLU

Project description

nbklu: Python bindings for KLU in nanobind

Installation

pip install nbklu
# or install from source
pip install git+https://github.com/determ1ne/nbklu.git

Usage

import numpy as np
from nbklu import KLUSolver


def main():
    n = 5
    Ap = np.array([0, 2, 5, 9, 10, 12])
    Ai = np.array([0, 1, 0, 2, 4, 1, 2, 3, 4, 2, 1, 4])
    Ax = np.array([2.0, 3.0, 3.0, -1.0, 4.0, 4.0, -3.0, 1.0, 2.0, 2.0, 6.0, 1.0])
    b = np.array([8.0, 45.0, -3.0, 3.0, 19.0])
    B = np.stack([b, b * 2, b * 3, b * 4], axis=0)

    solver = KLUSolver()
    solver.analyze(n, Ap, Ai)
    solver.factor(Ax)
    X = solver.solve(B)

    print(X)


if __name__ == "__main__":
    main()

Detailed documentation can be found in the KLU documentation.

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

nbklu-0.2.0.tar.gz (173.6 kB view details)

Uploaded Source

Built Distributions

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

nbklu-0.2.0-cp314-cp314t-win_amd64.whl (132.4 kB view details)

Uploaded CPython 3.14tWindows x86-64

nbklu-0.2.0-cp314-cp314t-win32.whl (113.2 kB view details)

Uploaded CPython 3.14tWindows x86

nbklu-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl (231.5 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nbklu-0.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (132.9 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nbklu-0.2.0-cp312-abi3-win_amd64.whl (123.2 kB view details)

Uploaded CPython 3.12+Windows x86-64

nbklu-0.2.0-cp312-abi3-win32.whl (105.5 kB view details)

Uploaded CPython 3.12+Windows x86

nbklu-0.2.0-cp312-abi3-musllinux_1_2_x86_64.whl (225.6 kB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ x86-64

nbklu-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (127.1 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nbklu-0.2.0-cp311-cp311-win_amd64.whl (125.4 kB view details)

Uploaded CPython 3.11Windows x86-64

nbklu-0.2.0-cp311-cp311-win32.whl (107.4 kB view details)

Uploaded CPython 3.11Windows x86

nbklu-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl (229.7 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

nbklu-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (131.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nbklu-0.2.0-cp310-cp310-win_amd64.whl (125.5 kB view details)

Uploaded CPython 3.10Windows x86-64

nbklu-0.2.0-cp310-cp310-win32.whl (107.6 kB view details)

Uploaded CPython 3.10Windows x86

nbklu-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl (230.1 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

nbklu-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (131.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file nbklu-0.2.0.tar.gz.

File metadata

  • Download URL: nbklu-0.2.0.tar.gz
  • Upload date:
  • Size: 173.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cfdd5fbd42e9920c4a8aaa12d06493d793a8bba9c18dba3a30265a21abb0c24f
MD5 1679e7df36b9545106a3fdfa1c79c835
BLAKE2b-256 7a2132fab39bb8d4f46e96d118a6d90636bdd97df79c2590b8cff783d6e30797

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0.tar.gz:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: nbklu-0.2.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 132.4 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 bb86579f3bbffd1a29877165961090d45b0719d7ff15f33acb585b19630279d3
MD5 c4dfd85ab5e2f554cd15238a5ccaa998
BLAKE2b-256 66d20d52e0a77ab8fbe88b75ba335ed413ec8c0532d348cbf34e09d613ea1231

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp314-cp314t-win_amd64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp314-cp314t-win32.whl.

File metadata

  • Download URL: nbklu-0.2.0-cp314-cp314t-win32.whl
  • Upload date:
  • Size: 113.2 kB
  • Tags: CPython 3.14t, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 920317a82f81a2474c8e1ae4e5657361320ca34b5ddc3266b256e18f17ef7023
MD5 413ef9903e910101573d398e0e3b7768
BLAKE2b-256 59775d13e5eeb65b182f3c63ccb5eaaadd5eccf5e08fccd7d91e9a48ced76454

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp314-cp314t-win32.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nbklu-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 539de51f437ebfd2a85145841dc3c9801dd0ce40604740decd1588f2b7ef0e60
MD5 3ceb279cce4f9b130fb137e8857a1dc2
BLAKE2b-256 e8e9df8cb7f8116c1a24dededc677cc8c65e4f34dddf5d5fc2b76c61a47b1cd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbklu-0.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f9e94181d4cc564b055e5cc20b78f6bfdab3da2a8ed9bd56c3dfe78a23ae3b19
MD5 5fd7c5451f0266b8c17f8f6260bf6f51
BLAKE2b-256 565697d27ea0157cbc6afde55682e6a89de5784e07c61ebffe553717b5a20cc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: nbklu-0.2.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 123.2 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d429a8be10ffc7e2f60a40b46d531b0c45b5e9ef980103af5a2222ec641ccb78
MD5 4c84913cb7a224222883cabb0f334d5d
BLAKE2b-256 c6b9514165e9de71d2b659bbb05f7ece68dc9457e068511a49b083412aaaf111

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp312-abi3-win_amd64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp312-abi3-win32.whl.

File metadata

  • Download URL: nbklu-0.2.0-cp312-abi3-win32.whl
  • Upload date:
  • Size: 105.5 kB
  • Tags: CPython 3.12+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0-cp312-abi3-win32.whl
Algorithm Hash digest
SHA256 a7ad77f9710912d53720a3aea1e8b620ac37ee3420e2b86521952b240a0eb8dc
MD5 92919d6130d49a5803c20af61be724a7
BLAKE2b-256 2eba50d3227766d57f52b9ba3fe5b3d7d28182c53a003917837feba2e9334a4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp312-abi3-win32.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nbklu-0.2.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 59698c27293b712e787506c92f9b6eb5ae911f7dc28adc5f8d1619f444114cca
MD5 d9bf3081ba7be0a9a5238e074231451d
BLAKE2b-256 043771ddad1503504bd382f61ef1025693618a9b217e4385e9aceec1893244a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp312-abi3-musllinux_1_2_x86_64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbklu-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1f1d1311a6c2f62c16d794441b6d759bc76580fc3f64e0c4c2b61fac579f633e
MD5 f59aa22e0e85bc773282798b12c648ed
BLAKE2b-256 c7efbda71f2ec121c676fcc78011016c9e3a1eae6fa94ef520b7f57706adce24

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: nbklu-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 125.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 633eef2ece3a1ee4169cb4b1c8d5da0e338ac6264bbbc1a3d4fa4d47eb9909cd
MD5 2dd5adaf36264a9e024290cffd2be4bd
BLAKE2b-256 6c68d3727da3b112331627e11c0f680243b182ca6e52670ec45eb61a385d39d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp311-cp311-win_amd64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: nbklu-0.2.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 107.4 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 b5e42e5bddc06848d7541ea40334c5dff6caff866f62a2435a899dadab08985d
MD5 987df3b65b0e0f5e8fa958a5f8cca3df
BLAKE2b-256 0381d4d8f899115ead3b95b46c4d34e87ca9b2bcc35871e5e4da5be8e48ffe29

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp311-cp311-win32.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nbklu-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 77d61ab2ce983e9280b1764347ad71afa8e9276b810fb668cb72a7a519d873e5
MD5 d431e3131e627f846d9305122d5ffc2e
BLAKE2b-256 81424bd7fff9543fc2204b36b1fd4c5567501322e72d796a5c39b72b0d2d5289

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbklu-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9683fc61a6e2625830df7abc4c48079bbda15cd28f9c048a869c9f87d90017a2
MD5 e63e25a2869221f8e70fb981a708de77
BLAKE2b-256 487a35e833721ee7533c80c237d9e776eea1b6ae8da75624cabc11697bf9cbf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: nbklu-0.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 125.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3c48e51921f353886dea1120907988ed47577bb84d782934814b71a9a9086e44
MD5 f472846e4fe5b0f86d5cb16473e72efd
BLAKE2b-256 ab71681f54685c4187dfd4288b2e9f666f52dad095786e46e1829186273276d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp310-cp310-win_amd64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: nbklu-0.2.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 107.6 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nbklu-0.2.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 334e4dbf83f8043a5d230cd3cae407b94c6e32fc1aaa826901af45c4f402ed21
MD5 8b43bddc61beea0af7071191ef3e4642
BLAKE2b-256 cf6e60bf39b1b8db979aedea33fabd9bc3ad2ba44a48704427bca41b23542a39

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp310-cp310-win32.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nbklu-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d6ee663ba006a867a76880646d74a050430cd7b197a79971ed151e9c338cc18a
MD5 04506589070782379cd1a17d6f9ac626
BLAKE2b-256 7d62b5f434e01e596c3f682b39f004d525af7c1d4fe44b56ce7ab182f38aaa43

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbklu-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbklu-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e9f06f9a4c088d23d1bb22ee957a569ce9594107c127c847ea6f2f99c50daa23
MD5 75cbb554a97d589593318720db423639
BLAKE2b-256 9a641979fe3e47e13a29da9ce3f16cef8c09bb54082916b335aa4ff5cb75f740

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbklu-0.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on determ1ne/nbklu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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