pentapy: A toolbox for pentadiagonal matrizes.
Project description
Welcome to pentapy
Purpose
pentapy is a toolbox to deal with pentadiagonal matrices in Python.
Installation
The package can be installed via pip. On Windows you can install WinPython to get Python and pip running.
pip install pentapy
References
The solver is based on the algorithms PTRANS-I and PTRANS-II presented by Askar et al. 2015.
Examples
Solving a pentadiagonal linear equation system
This is an example of how to solve a LES with a pentadiagonal matrix.
import numpy as np
import pentapy as pp
size = 1000
# create a flattened pentadiagonal matrix
M_flat = (np.random.random((5, size)) - 0.5) * 1e-5
V = np.random.random(size) * 1e5
# solve the LES with M_flat as row-wise flattened matrix
X = pp.solve(M_flat, V, is_flat=True)
# create the corresponding matrix for checking
M = pp.create_full(M_flat, col_wise=False)
# calculate the error
print(np.max(np.abs(np.dot(M, X) - V)))
This should give something like:
4.257890395820141e-08
Performance
In the following a couple of solvers for pentadiagonal systems is compared:
- Solver 1: Python implementation of
pentapy.solve
- Solver 2: Cython implementation of
pentapy.solve
- Solver 3:
scipy.sparse.linalg.spsolve
withuse_umfpack=False
- Solver 4:
scipy.sparse.linalg.spsolve
withuse_umfpack=True
- Solver 5: Lapack solver for diagonal matrices
scipy.linalg.lapack.dgbsv
- Solver 6: Scipy banded solver
scipy.linalg.solve_banded
- Solver 7: Standard solver of Numpy
np.linalg.solve
The performance plot was created with perfplot
.
Have a look at the script: examples/02_perform.py
.
Requirements:
Contact
You can contact us via info@geostat-framework.org.
License
MIT © 2019
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 Distributions
Hashes for pentapy-1.0.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2103da6dc5bdac386265bccda052d2bee11b1f5ee5bba7fde6ca67e6fac46ca9 |
|
MD5 | f1452351a7a401f2dd7e78e1c41cd65a |
|
BLAKE2b-256 | 36d38510ba457c8e7f95128b88f4f89341efb6bba483c04edf5fe5ec091aae18 |
Hashes for pentapy-1.0.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b5ba61e27433f8de5a8a663f835d5731e6900c266d7f4c5364a400c6e2a96db |
|
MD5 | 2d64f28d4b9ecab873b7572a652a6233 |
|
BLAKE2b-256 | 8b07a9c15f3d7af5264551d0ff20c5f2545769d5916d35975a67818b4aa17c60 |
Hashes for pentapy-1.0.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6089d112594f5d975df850ae610bd721b1108ed30d965cfa2a36e66c7199cd5f |
|
MD5 | 775bc9456bc51adecfe7ba6f249041fa |
|
BLAKE2b-256 | b52ed55ee8a1ec3786f4caf74192c9329fb6d95dae31e0761bd49681c5c478d3 |
Hashes for pentapy-1.0.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 901505c971bd525e91df42208fea2c7df0837fec9d69c12c5e1482ddb55163a1 |
|
MD5 | ba5878c0bf118ba07cf57df52308d022 |
|
BLAKE2b-256 | 52dd8c0688de276acc035f03ab5b0487aa9994d84518a4f624456996c79e6415 |
Hashes for pentapy-1.0.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8647d948e8b7d409cc761069c2bee7bbf8d4b5c953d7dffa2cbd97b65426fff |
|
MD5 | 4d556cacfd60951ffe21e7172a19b49a |
|
BLAKE2b-256 | d8b3dd5dc0ae4ae6bf75128a865c354c917dfbddb092adca4fee10789ce1f1ff |
Hashes for pentapy-1.0.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6019988939bb7df09fc872ff3704916ccf103675a916bda5f648de6965484582 |
|
MD5 | b5b1b9e7becbeb8fd9233c5e034643e8 |
|
BLAKE2b-256 | aaeca1f8099c9f0861ca7d78ee6accc329e7e2c1f5e31c80db3890ae967e8848 |
Hashes for pentapy-1.0.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119a2933d1136c415604dc5d5c83b0921c2eb575d6a861068c6e75ba66e53f11 |
|
MD5 | c9562d41f597bf92e99eae9f088938a7 |
|
BLAKE2b-256 | 8651a46bb6ba4d8f196e1a36f4e294b59326be5eb0072638dc5262dc0fd34519 |
Hashes for pentapy-1.0.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d68412fe60a319d59b21a65d7d65a12416cbfbb3e186750920bc32c31471325 |
|
MD5 | 6f9f6a4edd847c100f3fbd70fb839cf9 |
|
BLAKE2b-256 | 447528a5d92966f29494109b8645d20b5c23124fa094b949806ea60d5341a8d5 |
Hashes for pentapy-1.0.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69919f049bd41b1438718e79d44fa73832df3459be03ac3f2a8df7e4f5666390 |
|
MD5 | 5bad2bfd17acf33fc62ad7f2d0dcc6b7 |
|
BLAKE2b-256 | 4737a77518d849137a0f8ea690bfa1b000076203660e90f95f656bad445ad3be |
Hashes for pentapy-1.0.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b802747e045c068e3deabcb96d4afb4e6cdc15ab7d2d138318348ba7da99412 |
|
MD5 | 2373c8549da60e27df638112098cd74d |
|
BLAKE2b-256 | 3d9cc8eba95ae8138e81c1903107e3c9baa0a852a15291e718bfd287dc035771 |
Hashes for pentapy-1.0.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ede6d37a6df4a547b87f8799cd088939b859bb226735bb86f8e921d240e82d2a |
|
MD5 | 8b592a9db2909cf057bbf4e67f2d0e44 |
|
BLAKE2b-256 | 7724d791c5ce8d6e9a0b5af8a41fe6c39ca4a1e861ef3d5dbc1c8fd55d5d2753 |
Hashes for pentapy-1.0.0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cc03ab551f4e21108e4e2ad8411c45074d3f4e668dbc57fdbe70b2433d49b79 |
|
MD5 | 54e1a6ef88afc9b90f07d0d72bf32e87 |
|
BLAKE2b-256 | afcf9beac4af4a8cf842f10e70054d9252eb7ddaeb4cb1b3fe474a4944e4402d |
Hashes for pentapy-1.0.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91918f27eb7e0feef3d8d809362f490e2f12af6c9c0f6ff262ccde1ed1e8a16d |
|
MD5 | 7f4baddf95f444f7d6a8255c5094d0d0 |
|
BLAKE2b-256 | b7513d47a09a368fb63ac9aa5c5f2791c86456f8fd7fe5bbf5c6be26549619e4 |
Hashes for pentapy-1.0.0-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b499c3bca1609ed666c62feec5c0e8c8dffff410aeb49af4792bc26c6e9b6840 |
|
MD5 | 8d21fb2673a023aed2301680e25e4e97 |
|
BLAKE2b-256 | 6d21bacf82e12f49d829b7d4c0f801b537797864847cf83b01ab5fe8793f29ec |
Hashes for pentapy-1.0.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8433ddae607d5bfa3d92018d39a06463dd8ddcb6e5ea53c34904114adbce0c49 |
|
MD5 | 094adc31687ed30b3a4bdb2133112706 |
|
BLAKE2b-256 | 69a509724b99bab8a6e0e744604e97ec4c415c5ca0ed56537f7a2a8a3e92a89f |
Hashes for pentapy-1.0.0-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e93dc7129ccf7aed782bd826c6d68d202e9e6224e4a2a4251829f34f5603bab6 |
|
MD5 | bbf15a2eae70f412210d0c7ecf53c0c1 |
|
BLAKE2b-256 | 5d10404cff8c4f2fc0c4336baf8ae01b9fae35de9896946d443e7a9751f40c27 |
Hashes for pentapy-1.0.0-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6eb5f9e0422565b3f4e1572c92cda58391b8be9b124d05bb4c3e561a63ab4c87 |
|
MD5 | 124bb92e29a9b644fa482c2867676008 |
|
BLAKE2b-256 | 3f2cd0b2c9d320f6fd81a116311ad21a6e9981da662de02c996f012214381d47 |
Hashes for pentapy-1.0.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9955c5e71fb1c008ca75e940835aa5f280cc8457b7c0e6165577aacf862afae5 |
|
MD5 | 7bd61bc00c0e4b408e19e0469b1aa010 |
|
BLAKE2b-256 | aaa286669562403a06170afd312bb497feecf1ff2aad640d5b328efdab6c7816 |
Hashes for pentapy-1.0.0-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b662d6a4bd6992ae7205dfa051035e6da5859cdc4e70fc449c9edb09b1c92222 |
|
MD5 | 3eadefb2306d4bc8a94ba23dd6fedec5 |
|
BLAKE2b-256 | daee01d4c474a0e601e7967bb951f7d00dc09f4787df07462429def1855b9613 |
Hashes for pentapy-1.0.0-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e166f580139e22f5462831ef0fc4a40083595ecd3bd9002f340e4c7421e897f4 |
|
MD5 | c54d46971ccba291de7539233157700f |
|
BLAKE2b-256 | 83135190aa3d83ed3398986f581b3031e2d725f91ec530f080475a4d990a151c |
Hashes for pentapy-1.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fbded70cb852f08d64d20b797c06795e28628053eca95033119cd75ae5be6b5 |
|
MD5 | 22f19b9799a81c2438da4439f60bef0d |
|
BLAKE2b-256 | 1727a56d56c41a0a822f2d291d4155b520ca1bd2d2d85f3349d6cff7144bf3b2 |
Hashes for pentapy-1.0.0-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dec64c1d6f7b4f3c3c6d294680a66c651b56eee7bb1a75bd070be9f3e841477 |
|
MD5 | 7fe015aac9dd968f6e8d6e4f5d77e8c9 |
|
BLAKE2b-256 | 8e774fac32ca7369fa185b4bcae6ac1ad088c3bf97d61c5ca80b560bb15e4b81 |
Hashes for pentapy-1.0.0-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2baef6153a976aebea53ad748db5eac78c5c5d64ca1bce69fb350805f7dc385a |
|
MD5 | 4d851572db571253e1f06e112cbe296d |
|
BLAKE2b-256 | b702ed38c16749e21de83e3a2ea1e0ccedf0c0a12e8be84721a9c3c9fc381adc |
Hashes for pentapy-1.0.0-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4ae2157c106253149cf6e8eb8cf28a5f3f2a61fa55d64a5a654f91f8474260d |
|
MD5 | be1c79e69ceb200aa61e90395c4e766a |
|
BLAKE2b-256 | e03a778781446b807ba4a1b1634d4ed2c6d98c52868492930f4b33ee3a8161b4 |
Hashes for pentapy-1.0.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119d2f45c9f7b071c060d4f6800b52c10468a03f50e7d38c0af13ba4b995735c |
|
MD5 | 5e97af838c121381c28aa518341ae01d |
|
BLAKE2b-256 | dd93211ed44594cd10911089b93db577e89bbf7b75b09f539f09950d5482dff8 |
Hashes for pentapy-1.0.0-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9f1ed40762304cfc71c9fc721ea2ae0f4fc006a96632b56f464d24cc4226f05 |
|
MD5 | 20764f8d3bf4b92e792dd84f4dad9000 |
|
BLAKE2b-256 | b1d38b4e48fc600d6a60bc053d18f84667851151b2d79f430a2159de43bdd88f |
Hashes for pentapy-1.0.0-cp27-cp27m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a077b5a27a2af4077b985b87e1bb9ebf1234abd95f7ccfe4b8208d859a1d1c7e |
|
MD5 | 82dec2c5185b7c96698e2a887b97d19c |
|
BLAKE2b-256 | f2f8d8e89fe97b4907475f40a0b522151867e8562f5167b87f80eb1248c1ff6f |