Skip to main content

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.

Regression tests Coverage Status pypi package image Ruff Code style: black

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:

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

Contributing

Citing pyttb in your work

If you use pyttb in your work, please cite it using the citation info here.

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

pyttb-1.8.1.tar.gz (169.7 kB view details)

Uploaded Source

Built Distribution

pyttb-1.8.1-py3-none-any.whl (136.2 kB view details)

Uploaded Python 3

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

Hashes for pyttb-1.8.1.tar.gz
Algorithm Hash digest
SHA256 28c3356a36ad18b80b43e71196d8cd085857168f96d7506db37730357aeb8e38
MD5 1f07c5c4c1844998e8da4d1f15aa41e4
BLAKE2b-256 a18344d645d7f34e5a06426b8fa9717fd829d82fb053e893e80e19dd1dc65bc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyttb-1.8.1.tar.gz:

Publisher: python-publish.yml on sandialabs/pyttb

Attestations:

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

Hashes for pyttb-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bea920bcc187d044671c6e8392d385af07557cb2a9b7d2b31f22c248abc6e4ca
MD5 e74035d02a4983690954d6acd005583f
BLAKE2b-256 2de6ba40a1a55384c5ec42e7fa5d3b07df6d01033ab548e1744c4954a136ab47

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyttb-1.8.1-py3-none-any.whl:

Publisher: python-publish.yml on sandialabs/pyttb

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page