Show sparsity patterns of sparse matrices
Project description
betterspy
Show sparsity patterns of sparse matrices or write them to image files.
Example:
import betterspy
from scipy import sparse
A = sparse.rand(20, 20, density=0.1)
# betterspy.plot()
# set attributes on gca()
# plt.show()
# or directly
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
pip install betterspy
to install.
License
This software is published under the GPLv3 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.5.tar.gz
(18.2 kB
view hashes)
Built Distribution
betterspy-0.1.5-py3-none-any.whl
(17.7 kB
view hashes)
Close
Hashes for betterspy-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c90a460145aa3212c4a14bc880ce542d2570b8ff17f113f2aa95ca09a2cef7f |
|
MD5 | 5d373fc189eb4a061b4c73f89d23318f |
|
BLAKE2b-256 | e68ad72ff17f3add221417113d76f1fc33302e0a891e92dac325dffb7b6a29d9 |