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
from pentapy import solve
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
X = solve(M_flat, V, is_flat=True)
# create the corresponding matrix for checking
M = (
np.diag(M_flat[0, :-2], 2)
+ np.diag(M_flat[1, :-1], 1)
+ np.diag(M_flat[2, :], 0)
+ np.diag(M_flat[3, 1:], -1)
+ np.diag(M_flat[4, 2:], -2)
)
# calculate the error
print(np.max(np.abs(np.dot(M, X) - V)))
This should give something like:
4.257890395820141e-08
Requirements:
Contact
You can contact us via info@geostat-framework.org.
License
GPL © 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
pentapy-0.1.1.tar.gz
(133.7 kB
view hashes)
Built Distributions
pentapy-0.1.1-cp36-cp36m-win32.whl
(186.2 kB
view hashes)
pentapy-0.1.1-cp35-cp35m-win32.whl
(185.6 kB
view hashes)
pentapy-0.1.1-cp34-cp34m-win32.whl
(187.6 kB
view hashes)
pentapy-0.1.1-cp27-cp27m-win32.whl
(190.6 kB
view hashes)
Close
Hashes for pentapy-0.1.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a0fcf711aab8cbe35a34d80b5d356bcd05fc25e716ca6b4409f31da23e8f6e4 |
|
MD5 | 61bea982fd3eb0a3dd77c5ef1f05d12b |
|
BLAKE2b-256 | a9e9bb22348f7dd1ae240cce0bb0d1c522ee95722c1ca0c5838acb0de88b3697 |
Close
Hashes for pentapy-0.1.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02d8b570e4c55f6b30672f654d73e5e16d5d3c88ccbf1f837309cf2f79c52ced |
|
MD5 | f306beff8110b7ad435f40014d46deab |
|
BLAKE2b-256 | 8d4a733ee2f23568b8e34c65a828bcb79d5da9b76b0cc4201ac791aa97967835 |
Close
Hashes for pentapy-0.1.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3d321a074d144d057323056d9f4dee2c8cd261f04fd528d804d86f02ed648f4 |
|
MD5 | 83dd5fffd682389b17d2e032d893e0bc |
|
BLAKE2b-256 | a1ab1b81e267e78fa966b340999ff61dc4a3e79620c57ac06c0ecd21aedb1e53 |
Close
Hashes for pentapy-0.1.1-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8f7573c763333be32d8ec277be6f4cb365c26869c7ebf019e2a020424187250 |
|
MD5 | 81b82137c900ca86c0d7d0552b1aa41d |
|
BLAKE2b-256 | e09cf12def6b94780b180db1a8546ed2c3384b1e7ece9cd4e1347371df144524 |
Close
Hashes for pentapy-0.1.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54370e2dea71440f41476a15b7da7f325438d95c8794c4a7e9806fa3f29189ca |
|
MD5 | b18dabee1629c7a46993e87781c4906e |
|
BLAKE2b-256 | 38a23ef26ecc0452b35f0afe86a3f1e531d3cb2eaadc68714283062ad88b7315 |
Close
Hashes for pentapy-0.1.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e605fcc7918ef355f88f01004090aed68015b437112b7754b33f740c494cd17 |
|
MD5 | a584b13beec0637003a0393546ae34f8 |
|
BLAKE2b-256 | ec4ba7c9529cdafb201f15197010062c66670b73aee0f2dd6356f207d3f908cc |
Close
Hashes for pentapy-0.1.1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ddee5eaf2c3fbe2d3ea6ee5617b7b481a5b5eabd5ada49d049b3ba2355c30ec |
|
MD5 | 8d3d207e7acb6c1b67d7c2b08836f1c1 |
|
BLAKE2b-256 | 3b34c4272bd0c972e7c46f7f98c5b0934b2c9db57d408cfac4a34ce2d5cc5164 |
Close
Hashes for pentapy-0.1.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab40bba538de06fdeb99f967c374b010f0f36f25ac42b829366f0743cece7a42 |
|
MD5 | 0087d07b9d7cfc337c3271ae56a2fe36 |
|
BLAKE2b-256 | 6eeee580ff5306c6599f04db501ef3e5142c2876bf47ba14984e73ee78810d63 |
Close
Hashes for pentapy-0.1.1-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8e0a69a13496b6129816ac6d25d1ca9ad7a869bbcdc002e4bb38ed70749f7e0 |
|
MD5 | b0aad2dcf5a726482f502a57faa2e537 |
|
BLAKE2b-256 | ba32664153c5f190bfc525ad28ff19abc5f54ae79eab7a8a560695bde0dfbc88 |
Close
Hashes for pentapy-0.1.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15d675e5fee42697f39270119dfbac864a9e965e9619c9cf021e256761f28863 |
|
MD5 | 5b65ab05bc6553bf4cfd59ee362025fc |
|
BLAKE2b-256 | b37edbfb7ddf69ec63d3e5969e8b55fcfbd3f213c2852cad7b982e7c8d2054f5 |
Close
Hashes for pentapy-0.1.1-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d25cbb57914a7d1e5329db7f00d6f6134e4ad6188ef802e03c4724e866d4e8b2 |
|
MD5 | 54a13871477fdd41ad13f3acba1d1695 |
|
BLAKE2b-256 | 3ac7ed381f807012f2c58b34b2b323169e20ccf9817447d219db5298aebaa945 |
Close
Hashes for pentapy-0.1.1-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 862ff5d2033cf37fde47493afc9092797e6912f683d39800c69d0eb2ef376788 |
|
MD5 | bf40bf05782b8eaa1da1d3bfcd297745 |
|
BLAKE2b-256 | 1b9a2a314076280b7e9f36b2136d77358bca819ddcb1965e2d8565cfdf5b5a15 |
Close
Hashes for pentapy-0.1.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51009bf8217a0442b0f724a8ec384c5381f247075b305da3c3f90d7a7a52807b |
|
MD5 | 59878dd2e84df92224629b10a559ef22 |
|
BLAKE2b-256 | e9ce4db689c23e7f703bc9241db8f7b3c9bf6313a86ab5fd19f66ce7f6e03cc1 |
Close
Hashes for pentapy-0.1.1-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba002a46e60c88eec06def8b3addf0778cdc7816429515fb2fa9ebc650619aa7 |
|
MD5 | 4e2c11fddf68663980ddb5bf247d60fc |
|
BLAKE2b-256 | fd206b0ee397adbe610c93f74c1bf250bce913e4820af236d1fb4972b4a0fbc2 |
Close
Hashes for pentapy-0.1.1-cp34-cp34m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 625c80fd3c606c750e49012572dc314ea74601fedce715cbb7a8f7eb288f69fd |
|
MD5 | 1b5699efdd47e2d82c0ce02b486f9243 |
|
BLAKE2b-256 | c172871f85bdc41907fae26a74be7f82ea5b02ae57acaa36da6abf55ab21a5d7 |
Close
Hashes for pentapy-0.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ff47e1fd0f643eaae4d5b22817cbe60d6e4a645d9a2fe618b965752a46acba |
|
MD5 | ec44f406612c98019f50c4f16d8d9c0d |
|
BLAKE2b-256 | 7f4caba84636f27bae3ac65f955a52dcb9167f0fa17810b15239a2fb31075a19 |
Close
Hashes for pentapy-0.1.1-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296e6ef7435a14f6cbcd281c676d8fa03caae98bc5c72469ba7c21fbc6378311 |
|
MD5 | d8a6d6225c1ef1d42380eebd48d9fa2f |
|
BLAKE2b-256 | 0fbb67cd91162df66c03fe527278ffc8d77e2f0b62fa84775ebf3a68f366b9d9 |
Close
Hashes for pentapy-0.1.1-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13d455dfd42cd6a00d082574c083f803b0d0c758b2184fa4ef06bb928deecfb5 |
|
MD5 | 1029744706e66b9238b83f0c893316b4 |
|
BLAKE2b-256 | b810c1782a4ca27159ab3e398184ad4d94fea69d3363a9044ff890994d3ac67f |
Close
Hashes for pentapy-0.1.1-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25ac531608bcdee661528027d665905fbd9170b3a37617c6610f4ecf92d7247f |
|
MD5 | 90794ba7b13db64343cb326adff0e353 |
|
BLAKE2b-256 | afe0210e20c3606ba7f6ad288e58ad49c90bd0257b97f6208057022d65f02e7e |
Close
Hashes for pentapy-0.1.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23f26812a699f16db7623600eb77a42eda1fe146ce2f29648cf10423542b2aa8 |
|
MD5 | f731d88629f8baed026db5a46abc26c9 |
|
BLAKE2b-256 | 3bf124290f061ae0845b3ccd84ecc7aab4f1a1192dcf3a585bc568c842e955d5 |
Close
Hashes for pentapy-0.1.1-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d3afe435875eebb7f9ee86a10c2c07281f3294f748108ff7a84359926e8ff78 |
|
MD5 | adb479cf4d0bcd472af16c54e0f5f41d |
|
BLAKE2b-256 | 267a0f371ba06e7968ddc988bfda0523e0753e0683a4e95699e9bdfd6ce781c1 |
Close
Hashes for pentapy-0.1.1-cp27-cp27m-macosx_10_6_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f52d85cab09d3d72015212d6502a72066bf7396527eba0446c569c985e45255 |
|
MD5 | 2047a7fd4d4e199a972d033561f2665b |
|
BLAKE2b-256 | 6d5cfc50cab25b1a08d8bba9bb93ebfe690ecec5577ea6f8e66cc26ecd69ce63 |