skip to navigation
skip to content

TensorToolbox 0.1.8

Tools for the decomposition of tensors

Package Documentation

Latest Version: 1.0.16

Tensor Toolbox provides functionalities for the decomposition of tensors in tensor-train format [1] and spectral tensor-train format [2].

The toolbox provides the following tools:

  • TT-svd
  • TT-cross
  • TT-vectors
  • TT-matrices
  • Quatics TT-vectors/matrices
  • TT-integration
  • Basic operations in TT format
  • Multi-linear algebra in TT format (Steepest descent, CG and GMRES)
  • STT-construction
  • STT-projection/interpolation
  • STT for single quantities and for fields


For everything to go smooth, I suggest that you first install some dependencies separately: numpy, scipy, matplotlib can be installed by:

$ pip install numpy scipy matplotlib

If you need MPI support in the TensorToolbox, you need to have an MPI back-end installed on your machine and add the right path on the $LD_LIBRARY_PATH, so that mpi4py can link to it. You should install mpi4py manually by

$ pip install mpi4py

When everything is set, you can install the TensorToolbox using:

$ pip install TensorToolbox

Some users might want to install the toolbox without MPI support. This is possible, but not through the pip command:

$ pip install –download=”/pth/to/downloaded/files” TensorToolbox

$ cd /pth/to/downloaded/files

$ tar xzf TensorToolbox-x.x.x.tar.gz

$ cd TensorToolbox-x.x.x

$ python install –without-mpi4py

Test Installation

You can test whether all the functionalities work by running the unit tests.

>>> import TensorToolbox
>>> TensorToolbox.RunUnitTests(maxprocs=None)

where maxprocs defines the number of processors to be used if MPI support is activated. Be patient. The number of unit tests grows with the number of functionalities implemented in the software.


Examples can be found inside the package. To find them, download the source:

$ pip install –download=”/pth/to/downloaded/files” TensorToolbox

$ cd /pth/to/downloaded/files

$ tar xzf TensorToolbox-x.x.x.tar.gz

$ cd TensorToolbox-x.x.x

$ cd Examples


[1] Oseledets, I. (2011). Tensor-train decomposition. SIAM Journal on Scientific Computing, 33(5), 2295–2317. Retrieved from

[2] Bigoni, D. and Marzouk, Y.M. and Engsig-Karup, A.P. (2014) Spectral tensor-train decomposition. (Submitted)

File Type Py Version Uploaded on Size
TensorToolbox-0.1.8.tar.gz (md5) Source 2014-06-11 1MB