Skip to main content

Tools for building spectral methods

Project description

The SpectralToolbox is a collection of tools useful for spectral approximation methods in one or more dimensions. It include the construction of traditional orthogonal polynomials. Additionally one can construct orthogonal polynomials with respect to a selected measure.






Implementation of Spectral Methods in N dimension.

Available polynomials:
  • Jacobi
  • Hermite Physicists’
  • Hermite Physicists’ Function
  • Hermite Probabilists’
  • Hermite Probabilists’ Function
  • Laguerre Polynomial
  • Laguerre Function
  • Fourier
  • ORTHPOL package (generation of recursion coefficients using [1])
Available quadrature rules (related to selected polynomials):
  • Gauss
  • Gauss-Lobatto
  • Gauss-Radau
Available quadrature rules (without polynomial selection):
  • Kronrod-Patterson on the real line
  • Kronrod-Patterson uniform
  • Clenshaw-Curtis
  • Fejer’s


We reccommend to work in a virtual environment using virtualenv, or on the system python installation. The use of alternative virtual environment systems (such as Anaconda) is not guaranteed to be automatically supported, thus a manual installation is suggested in such case.

Make sure to have an up-to-date version of pip:

$ pip install –upgrade pip

Automatic installation

Run the command:

$ pip install –upgrade numpy $ pip install –upgrade SpectralToolbox

Manual installation (using pip)

Install the following dependencies separately:

$ pip install <package>

where <package> are the Python dependencies as listed in Requirements and X.X.X is the current revision version.

You should intall the orthpol package. This dependency is required since v. 0.2.0. The installation might require you to tweak some flags for the compiler (with gcc nothing should be needed).

$ pip install –no-binary :all: orthpol

Finally you can install the toolbox by:

$ pip install –no-binary :all: SpectralToolbox

Manual installation (from source files)

Note: This method may apply also to virtual environment systems different from virtualenv.

download and install each dependency manually with the following commands:

$ pip download <package>

$ tar xzf <package>-X.X.X.tar.gz

$ cd <package>-X.X.X

$ python install

$ cd ..

where <package> are the Python dependencies as listed in Requirements and X.X.X is the current revision version.


  1. Gautschi, “Algorithm 726: ORTHPOL – a package of routines for generating orthogonal polynomials and Gauss-type quadrature rules”. ACM Trans. Math. Softw., vol. 20, issue 1, pp. 21-62, 1994

Change Log

  • Implementation of Poly1D, PolyND, and additional quadrature rules
  • New interface for Spectral1D.
  • All polynomials are now classes.
  • Complete integration of orthpol
  • Python3 support. And fixed installation procedure.
  • Added function generate for the generation of polynomials from type and parameters.
  • Added class ConstantExtendedHermiteProbabilistsFunction, used for external projects.
  • Added functions from_xml_element in order to generate basis from XML structures.
  • Added class handling algebraic operations between polynomials (class SquaredOrthogonalPolynomial)
  • Added algebraic function class SquaredConstantExtendedHermitePhysicistsFunction
  • Added algebraic function class PositiveDefiniteSquaredConstantExtendedHermitePhysicistsFunction
  • Exact factorials in AlgebraicPolynomilas.
  • Memoization of coefficients

Project details

Release history Release notifications | RSS feed

Download files

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

Source Distribution

SpectralToolbox-1.0.12.tar.gz (697.9 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