A toolbox for Numba projects, currently providing mutable scalar helpers.
Project description
Numba Toolbox
Numba Toolbox is a small, growing collection of reusable helpers for Numba-based projects. The toolbox will expand as new shared needs emerge.
Installation
pip install numba-toolbox
Mutable scalars
The current feature set provides mutable scalar values for use in Numba-compiled code. They are useful when a value is stored inside an immutable container, such as a named tuple, but still needs to be updated without replacing the container or rebinding the value.
from typing import NamedTuple
from numba import jit
from numba_toolbox import MutableInt32, mutable_int32
class State(NamedTuple):
counter: MutableInt32
state = State(counter=mutable_int32(0))
@jit
def increment(state):
state.counter.value += 1
increment(state)
assert state.counter.value == 1
Factories are currently available for mutable booleans and signed or unsigned integers with 8-, 16-, 32-, and 64-bit storage.
Future direction
Additional utilities will be added when they solve recurring needs across our Numba-based projects.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file numba_toolbox-0.1.0.tar.gz.
File metadata
- Download URL: numba_toolbox-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f68e0080890a30efa4beff97920b22b2a7f12b97060799d4efc05ef401474e3
|
|
| MD5 |
f92c4d2496f276b58f7c1ff41de03661
|
|
| BLAKE2b-256 |
66ffb593b3c62f7f60e6e3760b194a6a05f9691069460bd1199929e861e40591
|
Provenance
The following attestation bundles were made for numba_toolbox-0.1.0.tar.gz:
Publisher:
release.yml on cognitive-modeling/numba-toolbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
numba_toolbox-0.1.0.tar.gz -
Subject digest:
5f68e0080890a30efa4beff97920b22b2a7f12b97060799d4efc05ef401474e3 - Sigstore transparency entry: 2281071570
- Sigstore integration time:
-
Permalink:
cognitive-modeling/numba-toolbox@d4fb16fb5bf2522b6601f3cecd2c9cc188337b81 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cognitive-modeling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4fb16fb5bf2522b6601f3cecd2c9cc188337b81 -
Trigger Event:
push
-
Statement type:
File details
Details for the file numba_toolbox-0.1.0-py3-none-any.whl.
File metadata
- Download URL: numba_toolbox-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2093c219bd270e95a6ee704e62948abe8ba98931eb4a019b9929207958fb8ddf
|
|
| MD5 |
e6eb8456d66d1412c124bbb6e9cb19df
|
|
| BLAKE2b-256 |
8c1708f6ff38c7e46a8d4c172d5a521fff9e43e2d7653ef893a1282e7a7ac539
|
Provenance
The following attestation bundles were made for numba_toolbox-0.1.0-py3-none-any.whl:
Publisher:
release.yml on cognitive-modeling/numba-toolbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
numba_toolbox-0.1.0-py3-none-any.whl -
Subject digest:
2093c219bd270e95a6ee704e62948abe8ba98931eb4a019b9929207958fb8ddf - Sigstore transparency entry: 2281071591
- Sigstore integration time:
-
Permalink:
cognitive-modeling/numba-toolbox@d4fb16fb5bf2522b6601f3cecd2c9cc188337b81 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/cognitive-modeling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4fb16fb5bf2522b6601f3cecd2c9cc188337b81 -
Trigger Event:
push
-
Statement type: