Coder Social home page Coder Social logo

pypropack's Introduction

A Python Wrapper for PROPACK

About

This is a Python wrapper for the PROPACK package, which implements efficient partial singular value decompositions of large sparse matrices and linear operators. The package is meant to stand alone, but may be included in Scipy at a later date.

This is a work in progress: not all routines are currently wrapped, and the code should be considered unsupported

Installation & Testing

To install in-place, type

python setup.py build_ext --inplace

To run the few unit tests that currently exist, type

nosetests pypropack/tests

Usage

Currently very straightforward. You can do

>>> from pypropack import svdp
>>> import numpy as np   
>>> A = np.random.random((10, 20))
>>> u, s, vt = svdp(A, k=3)  # compute top k singular values

The svdp documentation has more information.

Benchmarks

use the script plot_benchmarks.py for a comparison of PROPACK, ARPACK, SVDLIBC, and the standard LAPACK approaches to computing the svd.

PROPACK modifications

PROPACK had to be slightly modified to play well with gfortran. The PROPACK code used is version 2.1, downloaded from http://soi.stanford.edu/~rmunk/PROPACK/

For compatibility with gfortran, the files PROPACK/*/second.f needed to be slightly modified. The line

REAL      ETIME
EXTERNAL  ETIME

was changed to

EXTERNAL REAL ETIME

pypropack's People

Contributors

jakevdp avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.