pyttb

Python Tensor Toolbox

https://github.com/sandialabs/pyttb

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 12 committers (8.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.9%) to scientific vocabulary

Keywords

cp-decomposition data-science python scr-2671 snl-data-analysis tensors tucker-decomposition
Last synced: 6 months ago · JSON representation ·

Repository

Python Tensor Toolbox

Basic Info
Statistics
  • Stars: 38
  • Watchers: 3
  • Forks: 15
  • Open Issues: 42
  • Releases: 24
Topics
cp-decomposition data-science python scr-2671 snl-data-analysis tensors tucker-decomposition
Created almost 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

Copyright 2025 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

commandline python3 -m pip install pyttb

Example

```python

import pyttb as ttb X = ttb.tenrand((2,2,2)) type(X) M = ttb.cpals(X, rank=1) CPALS: 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 ```

Memory layout

For historical reasons we use Fortran memory layouts, where numpy by default uses C. This is relevant for indexing. In the future we hope to extend support for both. ```python

import numpy as np corder = np.arange(8).reshape((2,2,2)) forder = np.arange(8).reshape((2,2,2), order="F") print(corder[0,1,1]) 3 print(forder[0,1,1]) 6 ```

Getting Help

Contributing

Citing pyttb in your work

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

Owner

  • Name: Sandia National Laboratories
  • Login: sandialabs
  • Kind: organization
  • Location: United States

Exceptional service in the national interest.

Citation (CITATION.bib)

@misc{pyttb,
	author = {Dunlavy, Daniel M. and Johnson, Nicholas T. and others},
	month = aug,
	title = {{pyttb: Python Tensor Toolbox, v1.8.3}},
	url = {https://github.com/sandialabs/pyttb},
	year = {2025}
}

GitHub Events

Total
  • Create event: 21
  • Release event: 3
  • Issues event: 124
  • Watch event: 17
  • Delete event: 17
  • Member event: 1
  • Issue comment event: 185
  • Push event: 106
  • Pull request review comment event: 20
  • Pull request review event: 33
  • Pull request event: 112
  • Fork event: 3
Last Year
  • Create event: 21
  • Release event: 3
  • Issues event: 124
  • Watch event: 17
  • Delete event: 17
  • Member event: 1
  • Issue comment event: 185
  • Push event: 106
  • Pull request review comment event: 20
  • Pull request review event: 33
  • Pull request event: 112
  • Fork event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 231
  • Total Committers: 12
  • Avg Commits per committer: 19.25
  • Development Distribution Score (DDS): 0.537
Past Year
  • Commits: 58
  • Committers: 5
  • Avg Commits per committer: 11.6
  • Development Distribution Score (DDS): 0.603
Top Committers
Name Email Commits
Danny Dunlavy d****a@s****v 107
Nick 2****1 70
Tammy Kolda t****a@m****i 16
DeepBlockDeepak 4****k 14
Jeremy Myers j****1@w****u 13
Gabriel Brown g****n@g****m 4
Eric Phipps e****p@s****v 2
brian-kelley b****1@g****m 1
Kshitiz Gupta K****5@l****m 1
Jeremy Myers j****r@s****v 1
J. Derek Tucker j****k@s****v 1
Dunlavy d****a@s****v 1
Committer Domains (Top 20 + Academic)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 251 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 18
  • Total maintainers: 1
pypi.org: pyttb

Python Tensor Toolbox

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 251 Last month
Rankings
Dependent packages count: 6.6%
Average: 19.3%
Downloads: 20.7%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
.github/workflows/regression-tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/markdown-check.yml actions
  • actions/checkout v3 composite
  • gaurav-nelson/github-action-markdown-link-check v1 composite
.github/workflows/pull-request-links.yaml actions
  • readthedocs/actions/preview v1 composite
pyproject.toml pypi
  • numpy *
  • numpy_groupies *
  • scipy *
.github/workflows/pre-commit-check.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pre-commit/action v3.0.0 composite