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('out1.png', A, border_width=2)
betterspy.write_png('out2.png', A, border_width=2, colormap='viridis')
| :-------------------:|:------------------:| no colormap | viridis |
betterspy is available from the Python Package Index, so simply do
pip install -U betterspy
to install or upgrade. Use sudo -H
to install as root or the --user
option
of pip
to install in $HOME
.
To run the betterspy unit tests, check out this repository and type
pytest
To create a new release
-
bump the
__version__
number, -
publish to PyPi and tag on GitHub:
$ make publish
betterspy is published under the MIT license.