Python Tensor Toolbox
Project description
Copyright 2024 National Technology & Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the
U.S. Government retains certain rights in this software.
pyttb: Python Tensor Toolbox
Welcome to pyttb
, a refactor of the
Tensor Toolbox for MATLAB in Python.
This package contains data classes and methods for manipulating dense, sparse, and structured tensors, along with algorithms for computing low-rank tensor decompositions:
- Data Classes:
tensor
,sptensor
,ktensor
,ttensor
,tenmat
,sptenmat
,sumtensor
- Algorithms:
cp_als
,cp_apr
,gcp_opt
,hosvd
,tucker_als
Quick Start
Installation
python3 -m pip install pyttb
Example
>>> import pyttb as ttb
>>> X = ttb.tenrand((2,2,2))
>>> type(X)
<class 'pyttb.tensor.tensor'>
>>> M = ttb.cp_als(X, rank=1)
CP_ALS:
Iter 0: f = 7.367245e-01 f-delta = 7.4e-01
Iter 1: f = 7.503069e-01 f-delta = 1.4e-02
Iter 2: f = 7.508240e-01 f-delta = 5.2e-04
Iter 3: f = 7.508253e-01 f-delta = 1.3e-06
Final f = 7.508253e-01
Getting Help
- Documentation
- Tutorials
- Info for users coming from MATLAB
- Learn about tensor decompositions: tensor paper, tensor book
Contributing
Citing pyttb in your work
If you use pyttb in your work, please cite it using the citation info here.
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
File details
Details for the file pyttb-1.8.1.tar.gz
.
File metadata
- Download URL: pyttb-1.8.1.tar.gz
- Upload date:
- Size: 169.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28c3356a36ad18b80b43e71196d8cd085857168f96d7506db37730357aeb8e38 |
|
MD5 | 1f07c5c4c1844998e8da4d1f15aa41e4 |
|
BLAKE2b-256 | a18344d645d7f34e5a06426b8fa9717fd829d82fb053e893e80e19dd1dc65bc9 |
Provenance
The following attestation bundles were made for pyttb-1.8.1.tar.gz
:
Publisher:
python-publish.yml
on sandialabs/pyttb
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pyttb-1.8.1.tar.gz
- Subject digest:
28c3356a36ad18b80b43e71196d8cd085857168f96d7506db37730357aeb8e38
- Sigstore transparency entry: 148236284
- Sigstore integration time:
- Predicate type:
File details
Details for the file pyttb-1.8.1-py3-none-any.whl
.
File metadata
- Download URL: pyttb-1.8.1-py3-none-any.whl
- Upload date:
- Size: 136.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bea920bcc187d044671c6e8392d385af07557cb2a9b7d2b31f22c248abc6e4ca |
|
MD5 | e74035d02a4983690954d6acd005583f |
|
BLAKE2b-256 | 2de6ba40a1a55384c5ec42e7fa5d3b07df6d01033ab548e1744c4954a136ab47 |
Provenance
The following attestation bundles were made for pyttb-1.8.1-py3-none-any.whl
:
Publisher:
python-publish.yml
on sandialabs/pyttb
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pyttb-1.8.1-py3-none-any.whl
- Subject digest:
bea920bcc187d044671c6e8392d385af07557cb2a9b7d2b31f22c248abc6e4ca
- Sigstore transparency entry: 148236285
- Sigstore integration time:
- Predicate type: