Skip to main content

A python package for hierarchically semiseparable matrix representation

Project description

pyhss

A python package for hierarchically semiseparable matrix representation

Hierarchically semiseparable (HSS) matrix representation is a subclass of hierarchical matrices (H-matrices), which allows fast matrix multiplication, Cholesky decomposition, and other matrix computations. The HSS matrix representation is a hierarchical representation that is based on a recursive row and column partitioning of the matrix. Each k-level HSS representation is associated with k+1 level HSS tree on which all blocks of HSS matrices including the whole matrix can be represented. This package allows Python user to transform their matrix into HSS matrix representation seamlessly.

Install

Install pyhss simply by

pip install pyhss

Usage

For b = Ax we can implement

from pyhss import hss
from pyhss import hss_matmul

A = np.random.randn(100, 100)
x = np.random.randn(100, 1)

hss_mat = hss(maxdepth=10).build(A)
b = hss_matmul(A, x)
print(LA.norm(b - np.dot(A, x), 2))

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

pyhss-0.0.3.tar.gz (5.7 kB view details)

Uploaded Source

File details

Details for the file pyhss-0.0.3.tar.gz.

File metadata

  • Download URL: pyhss-0.0.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyhss-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9b2bceabd3086470efec869848bee2c57c3ba072f9fbf45f117b94d723820b45
MD5 ff170db8a9e3049b3b16deb0e95afe73
BLAKE2b-256 741f0b1243db2cbfd05afbb0d0540f35f3d2ae1f8134ee7d057bc50a6ab9d224

See more details on using hashes here.

Supported by

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