Show sparsity pattern of sparse matrices
Project description
betterspy
Show sparsity patterns of sparse matrices or write them to image files.
Example:
import betterspy
A = sparse.rand(20, 20, density=0.1)
betterspy.show(A)
betterspy.write_png(
"out.png", A,
# border_width=2,
# border_color="red",
# colormap="viridis"
)
| :-------------------:|:------------------:| no colormap | viridis |
There is a command-line tool that can be used to show matrix-market files:
betterspy msc00726.mtx [out.png]
See betterspy -h
for all options.
Installation
betterspy is available from the Python Package Index, so simply do
pip3 install betterspy --user
to install.
Testing
To run the betterspy unit tests, check out this repository and type
pytest
License
betterspy is published under the MIT license.
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
betterspy-0.1.2.tar.gz
(5.1 kB
view hashes)
Built Distributions
betterspy-0.1.2-py3-none-any.whl
(17.6 kB
view hashes)
Close
Hashes for betterspy-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33b55b753946fed1400672cd87e8ffa4542f4f437407325ecef7383626c99861 |
|
MD5 | dbaa01c5521588f8c064a0bf9dc683b3 |
|
BLAKE2b-256 | 50755ca02aa33df3d74208b10e15a8bf858f1b5a0648122ccae81e48de01f5ed |
Close
Hashes for betterspy-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cb8019a4ca4d0c155afbfdb01ba315a37896a47f1c10988c40f3e54ea112ad3 |
|
MD5 | 900142ea0f720221053a68a184e03608 |
|
BLAKE2b-256 | 663aba98bd73a2951647a5f646ee4fb649bada02333341966cfcff2fad31e3b3 |