Skip to main content

The 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-dmrg

  • TT-vectors

  • TT-matrices

  • Quatics TT-vectors/matrices (cross and dmrg)

  • 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

Status

PyPi:

http://southpacific.no-ip.org:8080/buildStatus/icon?job=pypi-TensorToolbox

LaunchPad:

http://southpacific.no-ip.org:8080/buildStatus/icon?job=TensorToolbox

TestPyPi:

http://southpacific.no-ip.org:8080/buildStatus/icon?job=testpypi-TensorToolbox

Installation

Make sure to have the latest version of pip installed:

$ pip install –upgrade pip

Automatic installation

You can first try the out-of-the-box installation using

$ pip install TensorToolbox

If this doesn’t work, proceed with the step by step installation

Step-by-step installation

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

TensorToolbox now stores data in both cPickle files and hd5 through the python package h5py. You need then to have the necessary library package libhdf5 and libhdf5-dev, or similar on your machine. Click here for more detailed information about the manual installation of h5py.

Once the hdf5 dependency is satisfied, we can proceed further. The package depends on Cython and requires to link to an mpi backend, and find the file mpi.h. In order to manually solve the dependencies do:

$ pip install cython

$ C_INCLUDE_PATH=<path-to-mpi.h-folder> pip install h5py

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 download TensorToolbox

$ cd /pth/to/downloaded/files

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

$ cd TensorToolbox-x.x.x

$ python setup.py 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

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

$ pip download TensorToolbox

$ cd /pth/to/downloaded/files

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

$ cd TensorToolbox-x.x.x

$ cd Examples

References

[1] Oseledets, I. (2011). Tensor-train decomposition. SIAM Journal on Scientific Computing, 33(5), 2295–2317. Retrieved from http://epubs.siam.org/doi/pdf/10.1137/090752286

[2] Bigoni, D. and Marzouk, Y.M. and Engsig-Karup, A.P. (2014) Spectral tensor-train decomposition. (Submitted) ArXiv: http://arxiv.org/abs/1405.5713

Change Log

1.0.2:
  • Fixed bug in TensorWrapper

1.0.1:
  • Fixed TensorWrapper unit tests

1.0.0:
  • Added support for Python3. Updated interface to SpectralToolbox 0.2.0.

Metadata

Release files for TensorToolbox 1.0.22

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

Source distribution (sdist)

Source distribution for TensorToolbox 1.0.22
File Size Uploaded
TensorToolbox-1.0.22.tar.gz 277.9 kB Details

Built distribution (wheel)

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

Total release size: 441.7 kB

Release files / TensorToolbox-1.0.22.tar.gz

Download URL TensorToolbox-1.0.22.tar.gz
Size 277.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f7053f4a734d41e68450eca311b8ab0aaee8c7ee1e072ad06f031b2f9ec3bb6f
BLAKE2b-256 checksum
How to use checksums
b0558141caa1fb6d7bbdd2001f51f30a232ca8009725f24b087d0df8f0efc848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.5

Release files / TensorToolbox-1.0.22-py3-none-any.whl

Download URL TensorToolbox-1.0.22-py3-none-any.whl
Size 163.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
452a13c3ffeed350aa09f70a21bef46512ebf65e2d634f33aa34ab76d616c442
BLAKE2b-256 checksum
How to use checksums
314649c9fd4e30d2bef5b7b57b3cdeefc29a9063f57e1a57628beac960e82041
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.29.1 CPython/3.6.5

Release history Release notifications | RSS feed

This release

1.0.22 This release

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.19

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

1 release file

1.0.15

1 release file

1.0.14

1 release file

1.0.13

1 release file

1.0.12

1 release file

1.0.11

1 release file

1.0.10

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.3.8

1 release file

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

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