SLEPc for Python — slepc4py 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# SLEPc for Python

Authors:

  Lisandro Dalcin, Jose E. Roman

Contact:

  dalcinl@gmail.com, jroman@dsic.upv.es

Web Site:

  slepc/slepc

Date:

  May 01, 2026

Abstract

This document describes slepc4py, a Python wrapper to the SLEPc libraries.

SLEPc is a software package for the parallel solution of large-scale eigenvalue problems. It can be used for computing eigenvalues and eigenvectors of large, sparse matrices, or matrix pairs, and also for computing singular values and vectors of a rectangular matrix. It also provides more advanced functionality such as solvers for nonlinear eigenvalue problems (either polynomial or general) and matrix functions.

SLEPc relies on PETSc for basic functionality such as the representation of matrices and vectors, and the solution of linear systems of equations. Thus, slepc4py must be used together with its companion petsc4py.

## Discussion and Support

- You can write to the PETSc Users Mailing List

- See also the contact information for SLEPc

- Issue Tracker: slepc/slepc/issues

- Git Repository: slepc/slepc.git (the source code is in `src/binding/slepc4py`)

- Current release in PyPI: https://pypi.org/project/slepc4py/

## Acknowledgments

L. Dalcin was partially supported by the Extreme Computing Research Center (ECRC), Division of Computer, Electrical, and Mathematical Sciences & Engineering (CEMSE), King Abdullah University of Science and Technology (KAUST).

See additional acknowledgements related to the SLEPc project.

## Contents

- Overview
  - Features
  - Components
- Tutorial
  - Commented source of demo examples
- Installation
  - Install from PyPI using pip
  - Install from the SLEPc source tree
- Citations
- CHANGES

Python specifics

- Reference
  - slepc4py
  - slepc4py.typing
  - slepc4py.SLEPc
- slepc4py demos
  - ex1.py: Standard symmetric eigenproblem for the 1-D Laplacian
  - ex2.py: Standard symmetric eigenproblem for the 2-D Laplacian
  - ex3.py: Matrix-free eigenproblem for the 2-D Laplacian
  - ex4.py: Singular value decomposition of the Lauchli matrix
  - ex5.py: Simple quadratic eigenvalue problem
  - ex6.py: Compute exp(t*A)*v for a matrix from a Markov model
  - ex7.py: Nonlinear eigenproblem with callback functions
  - ex8.py: Nonlinear eigenproblem with split form
  - ex9.py: Generalized symmetric-definite eigenproblem
  - ex10.py: Laplace problem using the Proper Orthogonal Decomposition
  - ex11.py: 2-D Laplacian eigenproblem solved with contour integral
  - ex12.py: Illustrate the use of arbitrary selection
  - ex13.py: Nonlinear eigenproblem with contour integral
  - ex14.py: Lyapunov equation with the shifted 2-D Laplacian