Skip to main content

Python module for multilinear algebra and tensor factorizations

Project description

scikit-tensor is a Python module for multilinear algebra and tensor factorizations.


The required dependencies to build the software are Numpy >= 1.3, SciPy >= 0.7.


Example script to decompose sensory bread data (available from using CP-ALS

import logging
from import loadmat
from sktensor import dtensor, cp_als

# Set logging to DEBUG to see CP-ALS information

# Load Matlab data and convert it to dense tensor format
mat = loadmat('../data/sensory-bread/brod.mat')
T = dtensor(mat['X'])

# Decompose tensor using CP-ALS
P, fit, itr, exectimes = cp_als(T, 3, init='random')


If you use scikit-tensor in your research, please cite

Maximilian Nickel. scikit-tensor Library (Version 0.1). Available Online, November 2013.


This package uses distutils, which is the default way of installing python modules. To install in your home directory, use

python install --user

To install for all users on Unix/Linux

python build
sudo python install

To install in development mode

python develop

Contributing & Development

scikit-tensor is still an extremely young project, and I’m happy for any contributions (patches, code, bugfixes, documentation, whatever) to get it to a stable and useful point. Feel free to get in touch with me via email (mnick at AT mit DOT edu) or directly via github.

Development is synchronized via git. To clone this repository, run

git clone git://


scikit-tensor is licensed under the GPLv3

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit-tensor-0.1.tar.gz (42.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page