Continuous and stable tracking of eigendecomposition for parameter-dependent matrices
Project description
EigenpairFlow
Continuous and stable tracking of eigendecomposition for parameter-dependent matrices.
Installation
Install from PyPI:
pip install eigenpairflow
Usage
Here is a minimal example of tracking the eigenpairs of a parameter-dependent matrix A(t).
First, define the matrix-valued function A(t) and its derivative dA(t)/dt.
import numpy as np
from eigenpairflow import eigenpairtrack
# Define a matrix function A(t)
def A_func(t):
return np.array([[3 + np.cos(t), np.sin(t)], [np.sin(t), 3 - np.cos(t)]])
def dA_func(t):
return np.array([[-np.sin(t), np.cos(t)], [np.cos(t), np.sin(t)]])
Then, call eigenpairtrack to solve the tracking problem over a given time interval.
# Set the time interval and evaluation points
t_start, t_end = 0.0, 3.0
t_eval = np.linspace(t_start, t_end, 10)
# Track the eigenpairs
result = eigenpairtrack(A_func, dA_func, (t_start, t_end), t_eval)
# The results object contains the tracked eigenvalues (result.Lambdas)
# and eigenvectors (result.Qs) at each time point in t_eval.
print(result)
EigenTrackingResults Summary:
success: True
message: The solver successfully reached the end of the integration interval.
t_eval: np.ndarray with shape (10,)
Qs: list of 10 np.ndarray(s), first shape: (2, 2)
Lambdas: list of 10 np.ndarray(s), first shape: (2, 2)
For more detailed examples, please see the demonstration notebooks.
Supported Versions
This project is continuously tested against the following versions to ensure compatibility.
The project's dependencies are managed by Poetry, which resolves the most suitable NumPy v1.x version for each Python interpreter. Forward-compatibility with NumPy v2.x is also explicitly tested on newer Python versions.
| Python Version | Tested NumPy Series |
|---|---|
| 3.9 | 1.x |
| 3.10 | 1.x |
| 3.11 | 1.x & 2.x |
| 3.12 | 1.x & 2.x |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eigenpairflow-0.2.0.tar.gz.
File metadata
- Download URL: eigenpairflow-0.2.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
184dce86d66707ee3f09920d1aebb7e1ef71e6f16b56050677e06048b8e6481a
|
|
| MD5 |
7e5460dfdb8931f1c122f64c6c3ab5b4
|
|
| BLAKE2b-256 |
6b26cb7a427097f3517054248154cd70fe8f38df5be6af7550cd3a86bb82e5ad
|
File details
Details for the file eigenpairflow-0.2.0-py3-none-any.whl.
File metadata
- Download URL: eigenpairflow-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
420603829e374c493b9f4e9af8f16b97a5dac6e8e5997c729b03ebeff8b2edcb
|
|
| MD5 |
4e8a7e9b057aea5109f8d4e10f68f480
|
|
| BLAKE2b-256 |
8aff7ac7a55f9ae0fe547a00ee2c43e82462908528e7d450ccdbb20f58cca251
|