• Stars
    star
    235
  • Rank 170,063 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 12 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python implementation of the TT-Toolbox

Build Status Coverage Status PyPi Downloads Downloads

ttpy

Python implementation of the Tensor Train (TT) -Toolbox. It contains several important packages for working with the TT-format in Python. It is able to do TT-interpolation, solve linear systems, eigenproblems, solve dynamical problems. Several computational routines are done in Fortran (which can be used separatedly), and are wrapped with the f2py tool.

Installation

Prerequisites

It is recommended that you use Anaconda Python distribution which has MKL library built-in. Anaconda Python is used for the development of ttpy.

Pip install

Install dependencies (numpy and cython)

   conda install numpy cython

Install ttpy

   pip install ttpy

Installing from source code

To install the development version, you need to install from the source. First, clone the repository with all submodules:

   git clone --recursive git://github.com/oseledets/ttpy.git
   python setup.py install

To update to the latest version (with all submodules) run

git pull
git submodule update --init --recursive *

Pre-built Docker image

The easiest way to play with TT Toolbox is through using the Docker (see Docker Hub page for details). In order to use it one needs just pull an image and run a container as in snippet below.

$ docker pull daskol/ttpy
    ...
Status: Image is up to date for daskol/ttpy:latest
docker.io/daskol/ttpy:latest
$ docker run -it --rm -v "$PWD":/workspace daskol/ttpy
Python 3.10.6 (main, Aug  3 2022, 10:13:24) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tt

What those packages do

They have the following functionality

  • tt : The main package, with tt.vector and tt.matrix classes, basic arithmetic, norms, scalar products, rounding full -> tt and tt -> full conversion routines, and many others
  • tt.amen : AMEN solver for linear systems (Python wrapper for Fortran code written by S. V. Dolgov and D. V. Savostyanov) it can be also used for fast matrix-by-vector products.
  • tt.eigb : Block eigenvalue solver in the TT-format
  • tt.ksl : Solution of the linear dynamic problems in the TT-format, using the projector-splitting KSL scheme. A Python wrapper for a Fortran code (I. V. Oseledets)
  • tt.cross : Has a working implementation of the black-box cross method.

Documentation and examples

The package provides Sphinx-generated documentation. To build HTML version, just do

cd tt/doc
make html

A few examples are available right now under examples directory

For any questions, please create an issue on Github.

Contributor policy

This project is now following the git flow approach. Namely:

  • branch master is only for stable versions and releases;
  • branch develop is main working branch;
  • contributor should create new branch for certain feature and then merge with develop branch as feature was done;
  • each release on master branch should correspond to package on PyPI;
  • A maintainer checks all the pull request

A pull request should satisfy the following requirements:

  • style and quality description of pull request;
  • new changes should be tested and shouldn't break anything;
  • pull request for one fix or one feature(could be several commits);
  • try to keep the code style of the project;

Current maintainer is Ivan Oseledets.

More Repositories

1

TT-Toolbox

The git repository for the TT-Toolbox
MATLAB
186
star
2

nla2020

Github repository for NLA2020 course
Jupyter Notebook
82
star
3

nla2018

NLA 2018 Skoltech course
Jupyter Notebook
51
star
4

dl2023

Deep learning @ Skoltech @ 2023
Jupyter Notebook
44
star
5

nla2022

Skoltech Numerical Linear Course Edition 2022
Jupyter Notebook
38
star
6

nla2017

Skoltech 2017 NLA course
Jupyter Notebook
37
star
7

nla2019

NLA 2019 course @ Skoltech.
Jupyter Notebook
35
star
8

nla2021

The repository for Skolech NLA2021
Jupyter Notebook
28
star
9

nla2016

Repository for 2016 NLA course @ Skoltech
Jupyter Notebook
20
star
10

nla2023

Skoltech 2023 NLA course
Jupyter Notebook
20
star
11

NLA

Lectures and materials for the Fall 2014 Skoltech numerical linear algebra course
Game Maker Language
14
star
12

dl2024

Deep Learning Course, Skoltech, 2024
Jupyter Notebook
13
star
13

nla2015

The main github repository for NLA2015 course
Jupyter Notebook
12
star
14

tt-fort

Fortran computing core of the TT-Toolbox
Fortran
10
star
15

mathdata

For a 4-lecture minicourse on "Mathematics for Data Science", Skoltech, Autumn 2016
Jupyter Notebook
7
star
16

fastpde2016

Skoltech fastpde 2016 course
Jupyter Notebook
5
star
17

fastpde

Lecture notes & materials for the Skoltech FastPDE course
CSS
5
star
18

bibtex

Bibtex repository of the INM group
TeX
4
star
19

fastpde2018

Fast PDE 2018 course
Jupyter Notebook
4
star
20

fastpde2017

Skoltech Autumn course CSE III: Fast and Efficient Solvers
Jupyter Notebook
3
star
21

talks-online

The IPython notebooks for my talks.
Jupyter Notebook
2
star
22

uq2018

Skoltech UQ course
Jupyter Notebook
2
star
23

pybtex

TeX
1
star