Skip to main content

An efficient complex eigensolver written in Rust.

Project description

eigs (The Python Package)

Find Eigenvalues and Eigenvectors efficiently in Python using UMFPACK + ARPACK (powered by Rust).

Example

import numpy as np
from scipy.sparse import csc_matrix
from eigs import eigs

data = np.array([ 0.+4.j,  2.+3.j,  4.+0.j,  0.-2.j, -3.+3.j,  0.-1.j,
                 -3.-3.j,  4.-4.j, -4.+0.j,  4.+1.j, -4.-1.j,  4.+2.j,
                  3.+2.j,  0.+2.j, -4.+0.j, -4.+1.j, -4.+2.j, -2.+2.j,
                 -1.-2.j,  0.+3.j, -3.+0.j,  4.+0.j, -1.+3.j])  # fmt: skip
indices = np.array([6, 1, 4, 5, 7, 2, 3, 4, 5, 6, 7, 1,
                    1, 3, 3, 4, 0, 2, 5, 6, 3, 6, 7])  # fmt: skip
indptr = np.array([0, 1, 5, 11, 12, 14, 16, 20, 23])
A = csc_matrix((data, indices, indptr))
vals, vecs = eigs(A=A, num_eigs=4, sigma=-2.0 + 7.0j)

for i, val in enumerate(vals):
    print(f"{i}: {val.real} + {val.imag}j")
0: -2.3310185657008846 + 7.624960781252993j
1: -4.525347075933688 + 1.8131068538310453j
2: 5.301183172745191 + 4.2055904210543575j
3: 0.1713950830265607 + 0.46316839127801934j

Find more examples in the examples folder.

Installation

Eigs is currently linux-only (x86_64) and python 3.9+. More platforms might be supported at a later point in time.

pip install eigs

License & Credits

© Floris Laporte 2023, LGPL-2.1

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

eigs-0.0.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

eigs-0.0.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

eigs-0.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

eigs-0.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

eigs-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

eigs-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page