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.0rc1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29b9f3cc78f8fe5ab14d62319f47a57b033c5986d7b8b3a3644008f8908cbdbb |
|
MD5 | b8f47d3a4d41648baa830d22d050b144 |
|
BLAKE2b-256 | ad249123325bb41a65903d2199e960582523dafb89eb74f793b995aba3e86cfd |
Hashes for pentapy-1.0.0rc1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db7b111ef779188e2b33af99f13813bb7773c06bf3921571816321e772b4c62f |
|
MD5 | 9e14c382de939419ad368960122d0487 |
|
BLAKE2b-256 | 71e9e5f51d8cddd9600ed25827727a472f06e083a9f5f6617f0c43654910b3c2 |
Hashes for pentapy-1.0.0rc1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67101256f6a9ebd27a82e2e80989999eb64305e4700c6bdbbe15a57dd38e0633 |
|
MD5 | b3996ba12b6e0acb24d6f53dcb897dbb |
|
BLAKE2b-256 | 330f9608a78eb0494b02efc49e85de6a142041633863a7b3531b575b682bc00a |
Hashes for pentapy-1.0.0rc1-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e696f97d6a2f10964d084994a2d470e826cbfd689fb44a8d775747fe140a0ce |
|
MD5 | a74a297e1b1b772a3bb3fe523a94118c |
|
BLAKE2b-256 | 0fdcda93c0d4bf5b2cb773d9c8a1ac8cd2a803e1ac90185cea0b6c1e3b559c1d |
Hashes for pentapy-1.0.0rc1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5486c5546e182ac5f813f254f9e5b02037fe929db8418c1de5555632b798a526 |
|
MD5 | a2efda24f2e13fb84978a127eacf656f |
|
BLAKE2b-256 | 0f3f380bda0870320825cba8e876b96546a165be73e7a978b3a2ce717892944c |
Hashes for pentapy-1.0.0rc1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7ebc94bde7bb672971981c22d28cbd75de67828abec4b93033587d05a3d5514 |
|
MD5 | a18e4392dcf941605d76b120041725ab |
|
BLAKE2b-256 | c29afd7996a8d67fa9b43bbf01ec0391d5d9230b45dc830dc40a867bdd843f7c |
Hashes for pentapy-1.0.0rc1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0a0c9cce42d3de3ad2bd0ab4bff2cdc39fdb616324c3c2ab1fcd11f42ab2d77 |
|
MD5 | 0617143c8d1dc4832acb820ae6346895 |
|
BLAKE2b-256 | e667a07d3806a1d386c3d34762e823d377d37a48f6d2619380c15cd6dc03cf5b |
Hashes for pentapy-1.0.0rc1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36ad2306fcead8d358864e453010fbcd17c3d856d421cf807c38f9b03c6501f3 |
|
MD5 | 4f69184899ec2a60810d2f02d096b511 |
|
BLAKE2b-256 | b3a48623fbf9cd1e0af6bb8d0330e022237ce7e15321cc57b35b2f294649d79c |
Hashes for pentapy-1.0.0rc1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60b45988b6f4e90169446cc769d0d51962b05b004f3dada11e040fac229c9839 |
|
MD5 | e8f4eb8a37beda37c1a0bd541f5d08c0 |
|
BLAKE2b-256 | 0cb33ac645ccb0b88d182f4532ef335287c981b95b4d9949ac892375078195d9 |
Hashes for pentapy-1.0.0rc1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f833bb8a5c219380eb1ecf464414cb8534615c8e4c8c99b6a8538a851b5d8e38 |
|
MD5 | d51113a14bcf47f341f74432602472ff |
|
BLAKE2b-256 | 4835e4a70c50c9fa9986c42295db41aeba2e34a7ac7efb0ee579216adc0411a1 |
Hashes for pentapy-1.0.0rc1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff88e5168397a8c5867836a6ef1e7d07b33c84820f6ac425dcdf5ec7c68408ca |
|
MD5 | ac8d14e3656a4c6e397bb4739f053d3e |
|
BLAKE2b-256 | 05acfa543d058f74d2c2a66674b5991f9b1836ef00ffa41af2069913838c57a8 |
Hashes for pentapy-1.0.0rc1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11bfe4add6f0508463650a5e408bb84fb20d9ef7cfa3e835d07a062d760665aa |
|
MD5 | fa3ea01111c183c44fc64a5d137183c0 |
|
BLAKE2b-256 | 49f0332f51f641c7f1a4002c01a73c2172ce1359dc90f230ba9568c33f597d53 |
Hashes for pentapy-1.0.0rc1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2a30a759545ad96c092cf7949dbed3353cf6c4186d8fc351a5c4f55fc76b401 |
|
MD5 | bca294d46e033fd42dbb1dbba87883e8 |
|
BLAKE2b-256 | dba13c2c9bd4a46c1ae845294be60d8b6555d0e60b93bb05f7c14da40e677f37 |
Hashes for pentapy-1.0.0rc1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaea2c9dbdae4d7125ae2d0ada2e2bcc251df418d775683bb07db4a8edc3237e |
|
MD5 | e92ee093c9537be1f7a7fadd4875e68f |
|
BLAKE2b-256 | f3d4ea1011da4a87ad211f6e0b87c98d93ef0434ca06eb21cff14322cc52d32e |
Hashes for pentapy-1.0.0rc1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bff41bf7feab48a7562d8875e4e6cf62057b1e583a3cc3dafe85a320d9a2e7c4 |
|
MD5 | cd2ce56289e3b29c034a968c50905b3e |
|
BLAKE2b-256 | fc05ca3c025c3edd4d9b51b122124038bfb64a9b2f79354465f9a83631c9195b |
Hashes for pentapy-1.0.0rc1-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d48a2e4cb91656dbf2fd80b1ed35f718fb5461cca126b813820029e0686a0539 |
|
MD5 | 9ba7bccc07ef1127f24391c1b8ae7fa1 |
|
BLAKE2b-256 | 796d41ab4f0b23c8f386475a87144a72ace8808d2930fd9f712da2162bba86f2 |
Hashes for pentapy-1.0.0rc1-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 664569c61fb9e03abf4954b4679f8b75603224ec97e3b268c59b2d998254caa9 |
|
MD5 | 40952df2b7e1478d1d23b45a84f54a57 |
|
BLAKE2b-256 | 6489cd71d7bbcac605b7e9a72e13331af28b35f9e4fe0b3540315655d79236e9 |
Hashes for pentapy-1.0.0rc1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cfb6be2a7290b497accf973281b79c819b53d0e4be3a238b2213bec31e72f21 |
|
MD5 | 19f97db7c3b2a317ae9a2dd635829c51 |
|
BLAKE2b-256 | b6c2c1678170c547b9154b8a74c23490dfbf6cc54081cb10429432882b7ad4e5 |
Hashes for pentapy-1.0.0rc1-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47b81a4c66f343a47d2d8fcd1398586eb0b8e985611a72b5ea574238cd95574 |
|
MD5 | 64ec69f99db2eb636456eb578ae3f71c |
|
BLAKE2b-256 | 29f5c60d368f4ee3624e3d3a45f0a36f1bd5cc35d89d9689f1832d3b5ac9ccaf |
Hashes for pentapy-1.0.0rc1-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df33d31a3ffc8d2943ec2188b048494b11dfd70e078887658cce63724465572d |
|
MD5 | a1068e988b4dd6468e8c0a2ba275eef2 |
|
BLAKE2b-256 | 6466adcb2e62ac439f9db2e2d97010e82817e69465624ccb7d43be6c7bdba7d7 |
Hashes for pentapy-1.0.0rc1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4b0be0784ebc38f7f256d03e2d200704f43154605ae30f7d447e8ce3fe889eb |
|
MD5 | ceea98d63aa02e7ee7f22d3c5aabcc14 |
|
BLAKE2b-256 | bc78404c36c34ca335ff043f7b2ae7008a120f38280155c9e728a689eed363e5 |
Hashes for pentapy-1.0.0rc1-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e1ddda511c755622ba496364edebee829c66c52c97e541b0bf424e6a15159f4 |
|
MD5 | 7b629a84fe6ea353139897d41d374ae9 |
|
BLAKE2b-256 | c05883f0cc258bca21474ca277d827643ea97f0315c20af5507a4284cfe29d41 |
Hashes for pentapy-1.0.0rc1-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6647e0e5e508717d7c18717b210eae70fc8d6ffc39d1ec048f9e838bac664cc1 |
|
MD5 | cdf7f4fcdb4dcb2d41bf9370fd6de633 |
|
BLAKE2b-256 | d50dd00ca1cda730b7191e976a574b5eb2d6d40c2a171541e1530aadf670fb6c |
Hashes for pentapy-1.0.0rc1-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0837d5e2f8e89960a3e3bf7025adcccde15968f8b5b4ed8cef5102852aaebe9f |
|
MD5 | 82a6cf80601a69386ad3281bf693fe13 |
|
BLAKE2b-256 | af50044f56a01c34df2209af17b41d543aad58845cbb305405369a5df439fba2 |
Hashes for pentapy-1.0.0rc1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 855cf3740693b32d762817ba889e59e981a42cd0602c6eb34fe270f0062bbc08 |
|
MD5 | 63f71c95f230b54c4222db42f9d3adfd |
|
BLAKE2b-256 | cae0665cc3d1de4e0957a709637542e2fffb2bbbc04742f740d63e9de2fc5c58 |
Hashes for pentapy-1.0.0rc1-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85bf32b11e096e84aefe0f4cac80576f871acee3eedffbf7f13a1d0c99dd9085 |
|
MD5 | 8dc75c623153827497f08bfaa1163c25 |
|
BLAKE2b-256 | 712c995c03b3e3063281efa0cf12882c962db33d0e6ce0c4cd75d675de204681 |
Hashes for pentapy-1.0.0rc1-cp27-cp27m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21c00dd999874c4b5e8f1143ce7c2dc213e9d16eeb46325364012e10fa1a9ed1 |
|
MD5 | a1ec2bc927ba71d6035b616210f93c1f |
|
BLAKE2b-256 | ab381181555609c1fc2409cd557670c3f3b62b1a1cf910cfd65e142be44d9c40 |