Skip to main content

Jordan Form

CI Status Documentation Status

Test coverage percentage uv Ruff prek

PyPI Version Supported Python versions License


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

Metadata

Release files for jordan-form 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jordan-form 1.1.0
File Size Uploaded Provenance Actions
jordan_form-1.1.0.tar.gz 14.8 kB With provenance Details for jordan_form-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jordan-form 1.1.0
File Interpreter ABI Platform Actions
jordan_form-1.1.0-py3-none-any.whl Python 3 none any Details for jordan_form-1.1.0-py3-none-any.whl

Total release size: 27.7 kB

Release files / jordan_form-1.1.0.tar.gz

Download URL jordan_form-1.1.0.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
80cda8a4aa218a5bddeecd18e0dcb56a8a29450a6fa42b5a67fa74c37d67e576
BLAKE2b-256 checksum
How to use checksums
66c524e7a280a2449637ae836d2ef5d66ef85637edc9f18500da62fd3dd601a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / jordan_form-1.1.0-py3-none-any.whl

Download URL jordan_form-1.1.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0ac8c1aeb51ec273415a5d4c98c4a2426d25f81316117955697db7526a54725
BLAKE2b-256 checksum
How to use checksums
09eaca6f3fcbb0c3eed043d54b83676ff288cfef5a62c92751b66392769f7027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for jordan-form 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jordan_form-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page