Compute jordan canonical (normal) form of (nonlinear / generalized) eigenvalue problem
Project description
Jordan Form
Documentation: https://jordan-form.readthedocs.io
Source Code: https://github.com/34j/jordan-form
Compute jordan canonical (normal) form of (nonlinear / generalized) eigenvalue problem
Installation
Install this via pip (or your favourite package manager):
pip install jordan-form
Usage
Consider a function
$$ T(\lambda) = \begin{pmatrix} \lambda^2 & -\lambda \ 0 & \lambda^2 \end{pmatrix} $$
which eigenvalue is 0. (Example 1. from Nonlinear Eivenvalue Problems which is from Matrix Polynomials (Computer Science and Applied Mathematics). (1982). Academic Press.)
import numpy as np
from jordan_form import canonical_jordan_chains
def f(
eigval: float, derv: int
) -> np.ndarray[tuple[int, int], np.dtype[np.number]] | None:
if derv == 0:
return np.array([[eigval**2, -eigval], [0, eigval**2]])
elif derv == 1:
return np.array([[2 * eigval, -1], [0, 2 * eigval]])
elif derv == 2:
return np.array([[2, 0], [0, 2]])
else:
return np.zeros((2, 2))
chains = canonical_jordan_chains(
f, 0, atol_rank=1e-3, rtol_rank=1e-3, atol_norm=1e-3, rtol_norm=1e-3
)
print(chains)
CanonicalJordanChains(eigval=0, chains=[array([[1., 0.],
[0., 1.],
[0., 0.]]), array([[0., 1.]])])
CLI Usage
> jordan-form "{{x^2,-x},{0,x^2}}" 0
Algebraic multiplicity: 4
Geometric multiplicity: 2
Dimension of generalized eigenspace: [2 3 4]
Dimension of ith generalized eigenvectors: [2 1 1]
Chain lengths: [3 1]
Chain 0:
[[1. 0.]
[0. 1.]
[0. 0.]]
Chain 1:
[[0. 1.]]
References
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
Project details
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 jordan_form-1.0.0.tar.gz.
File metadata
- Download URL: jordan_form-1.0.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c7892454d71441d96706ff775e1119486d0426fbd6c0b4f727fb19141e5271f
|
|
| MD5 |
0753c1f1023b729d1d4a5f27cc50a94c
|
|
| BLAKE2b-256 |
c786120ceb8b48bc57cde6dc4c4aa1b1bb3dd544ddf7d8b6ed61bda642502488
|
Provenance
The following attestation bundles were made for jordan_form-1.0.0.tar.gz:
Publisher:
ci.yml on 34j/jordan-form
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jordan_form-1.0.0.tar.gz -
Subject digest:
2c7892454d71441d96706ff775e1119486d0426fbd6c0b4f727fb19141e5271f - Sigstore transparency entry: 220114797
- Sigstore integration time:
-
Permalink:
34j/jordan-form@c541ad94016dd85d22c3bc95e7175d807541b1b7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/34j
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c541ad94016dd85d22c3bc95e7175d807541b1b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jordan_form-1.0.0-py3-none-any.whl.
File metadata
- Download URL: jordan_form-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96d5dfa89078b06cb09b34ef6af95f30b339fe3b5b64a3092651c9b07280f743
|
|
| MD5 |
422b918263afb97a74f56229eb6a343d
|
|
| BLAKE2b-256 |
1e7acaf83e4837b4fae0f00f50927fe642a273bb0a98f67f62a5170189da459c
|
Provenance
The following attestation bundles were made for jordan_form-1.0.0-py3-none-any.whl:
Publisher:
ci.yml on 34j/jordan-form
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jordan_form-1.0.0-py3-none-any.whl -
Subject digest:
96d5dfa89078b06cb09b34ef6af95f30b339fe3b5b64a3092651c9b07280f743 - Sigstore transparency entry: 220114798
- Sigstore integration time:
-
Permalink:
34j/jordan-form@c541ad94016dd85d22c3bc95e7175d807541b1b7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/34j
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c541ad94016dd85d22c3bc95e7175d807541b1b7 -
Trigger Event:
push
-
Statement type: