Fast array utilities with minimal dependencies.
Project description
usage
fast-array-utils supports the following array types:
numpy.ndarray
scipy.sparse.cs{rc}_{array,matrix}
cupy.ndarray and cupyx.scipy.sparse.cs{rc}_matrix
dask.array.Array
h5py.Dataset and zarr.Array
anndata.abc.CS{CR}Dataset (only supported by .conv.to_dense at the moment)
Use fast_array_utils.conv.to_dense to densify arrays and optionally move them to CPU memory:
from fast_array_utils.conv import to_dense
numpy_arr = to_dense(sparse_arr_or_mat)
numpy_arr = to_dense(dask_or_cuda_arr, to_cpu_memory=True)
dense_dask_arr = to_dense(dask_arr)
dense_cupy_arr = to_dense(sparse_cupy_mat)
Use fast_array_utils.conv.* to calculate statistics across one or both axes of a 2D array. All of them support an axis and dtype parameter:
from fast_array_utils import stats
all_equal = stats.is_constant(arr_2d)
col_sums = stats.sum(arr_2d, axis=0)
mean = stats.mean(arr_2d)
row_means, row_vars = stats.mean_var(arr_2d, axis=1)
installation
To use fast_array_utils.stats or fast_array_utils.conv:
(uv) pip install 'fast-array-utils[accel]'
To use testing.fast_array_utils:
(uv) pip install 'fast-array-utils[testing]'
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 fast_array_utils-1.4.1.tar.gz.
File metadata
- Download URL: fast_array_utils-1.4.1.tar.gz
- Upload date:
- Size: 336.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
466512aa0e19ebfb2f8d7ae8736fc81b5724e9bf1a7958474206c17b8e991e9c
|
|
| MD5 |
d1536bfefb5301da7fc7887f327bb26c
|
|
| BLAKE2b-256 |
f5867345025275bd19b1303bb6267133982f4e95309f85a39529036566cf3b29
|
Provenance
The following attestation bundles were made for fast_array_utils-1.4.1.tar.gz:
Publisher:
publish.yml on scverse/fast-array-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fast_array_utils-1.4.1.tar.gz -
Subject digest:
466512aa0e19ebfb2f8d7ae8736fc81b5724e9bf1a7958474206c17b8e991e9c - Sigstore transparency entry: 1270869745
- Sigstore integration time:
-
Permalink:
scverse/fast-array-utils@f07b25f5ab5896f17a45479b91bcab224fcc13ee -
Branch / Tag:
refs/tags/v1.4.1 - Owner: https://github.com/scverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f07b25f5ab5896f17a45479b91bcab224fcc13ee -
Trigger Event:
release
-
Statement type:
File details
Details for the file fast_array_utils-1.4.1-py3-none-any.whl.
File metadata
- Download URL: fast_array_utils-1.4.1-py3-none-any.whl
- Upload date:
- Size: 39.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cad55a58359cac4084445d801b50904357093a94863aca7ff7118bd4bd38ce7c
|
|
| MD5 |
86e56554f60acd57258c05a22b1388e0
|
|
| BLAKE2b-256 |
ea28aad6d6b63085766c994cf50f2e1f7bd514bd20eb149ad15477db8339420a
|
Provenance
The following attestation bundles were made for fast_array_utils-1.4.1-py3-none-any.whl:
Publisher:
publish.yml on scverse/fast-array-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fast_array_utils-1.4.1-py3-none-any.whl -
Subject digest:
cad55a58359cac4084445d801b50904357093a94863aca7ff7118bd4bd38ce7c - Sigstore transparency entry: 1270869753
- Sigstore integration time:
-
Permalink:
scverse/fast-array-utils@f07b25f5ab5896f17a45479b91bcab224fcc13ee -
Branch / Tag:
refs/tags/v1.4.1 - Owner: https://github.com/scverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f07b25f5ab5896f17a45479b91bcab224fcc13ee -
Trigger Event:
release
-
Statement type: