A pure-python, friendly interface to the generalized singular value decomposition (GSVD).
Project description
easygsvd
A pure-Python, friendly interface to the generalized singular value decomposition (GSVD).
easygsvd is built on NumPy/SciPy and provides:
- A simple function
gsvd(A, L)for dense GSVD of a matrix pair $(A, L)$. - A
GSVDResultobject exposing the core GSVD factors (Uhat,Vhat,X,Y,c,s, etc.). - Convenience methods for:
- orthogonal projectors onto
col(A),ker(A),col(L),ker(L), etc. - oblique projectors associated with the pair
(A, L). - A-weighted and L-weighted oblique pseudoinverses.
- orthogonal projectors onto
- An incremental API for appending columns to
(A, L)and updating the GSVD efficiently.
See the documentation for more details.
Note: This implementation assumes the stacked matrix
np.vstack([A, L])has full column rank. If this condition is violated (initially or after appending columns), aLinAlgErroris raised.
Installation
pip install easygsvd
Example usage
import numpy as np
from easygsvd import gsvd
# Sizes of test matrices
M = 200
K = 195
N = 100
# Draw random test matrices with standard Gaussian entries
A = np.random.normal(size=(M, N))
L = np.random.normal(size=(K, N))
# Compute the economic GSVD of (A, L)
gsvd_result = gsvd(A, L, full_matrices=False)
# Compute the economic GSVD of (A, L)
gsvd_result_full = gsvd(A, L, full_matrices=True)
gsvd_full = gsvd(A, L, tol=1e-12, full_matrices=True)
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 easygsvd-0.0.4.tar.gz.
File metadata
- Download URL: easygsvd-0.0.4.tar.gz
- Upload date:
- Size: 292.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09f62a3ed7c245aaa4e8fca780f4a4bf6636fac4a7248654a830745e2eeabd2e
|
|
| MD5 |
90bfbe126d5eb7b24e56e0ee350e1a1f
|
|
| BLAKE2b-256 |
93be8913a04f5a13fc3582aeae2a4d30263d211fe0301618febe3ca88d94611c
|
File details
Details for the file easygsvd-0.0.4-py3-none-any.whl.
File metadata
- Download URL: easygsvd-0.0.4-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ecfe7e856f65f56e8ff856d39e5f3c60be7173f7a0ffd117b89f5b1299a5e6
|
|
| MD5 |
3c54935554e392d48b7fff3158065c06
|
|
| BLAKE2b-256 |
a80fee16b1ea21a984a8f2ab797b86c74c1d4530e6d0e0b2fd5c65c645e2c50a
|