Skip to main content

Tencat

Tencat is a Python library that offers basic sparse tensor slicing capabilities.

Installation

Use the package manager pip to install tencat.

pip install tencat

Usage

Tencat implements the coordinate format in SparseTensor using a (N,d) ndarray as indices, a (N,) ndarray as values and an optional d length size tuple.

from tencat import tencat as tc

nnz = 100 # Number of nonzero elements
ndim = 4 # Number of dimensions

indices = np.randint(100,(nnz,ndim)) # Create random indices
values = np.random.rand(nnz,) # create random elements

dense_shape = np.amax(indices,axis=0) + np.random.randint(5,size=(ndim,))

sparse_tc = tc.SparseTensor(indices,values,dense_shape)

sliced_tc = sparse_tc.slice((1,5,6,4),(3,2,10,5))

License

MIT

Metadata

Release files for tencat 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tencat 0.3
File Size Uploaded
tencat-0.3.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tencat 0.3
File Interpreter ABI Platform
tencat-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / tencat-0.3.tar.gz

Download URL tencat-0.3.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
47c028e6f6c31d91eb2015de0991d15f1106174a57cf8603827c9a00071f5d80
BLAKE2b-256 checksum
How to use checksums
6f2ba9e3ea3cf01f9c22b22291426f89f10911eaea966366430c66c5ace1051b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

Release files / tencat-0.3-py3-none-any.whl

Download URL tencat-0.3-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5f3af9d25da89faf6a00e642a51968f4c3465db362381b2df35654d295a77ed
BLAKE2b-256 checksum
How to use checksums
ad0998d0727532c320fa063f9aef0fc000d24eb0b805317fe1695bcad3dccab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page