项目作者: nschloe

项目描述 :
:eyes: Visualization for SciPy sparse matrices.
高级语言: Python
项目地址: git://github.com/nschloe/betterspy.git
创建时间: 2013-11-12T15:51:46Z
项目社区:https://github.com/nschloe/betterspy

开源协议:GNU General Public License v3.0

下载


betterspy

PyPi Version
PyPI pyversions
GitHub stars
PyPi downloads

Discord

gh-actions
codecov
LGTM
Code style: black

Show sparsity patterns of sparse matrices or write them to image files.

Example:

  1. import betterspy
  2. from scipy import sparse
  3. A = sparse.rand(20, 20, density=0.1)
  4. # betterspy.plot()
  5. # set attributes on gca()
  6. # plt.show()
  7. # or directly
  8. betterspy.show(A)
  9. betterspy.write_png(
  10. "out.png",
  11. A,
  12. # border_width=2,
  13. # border_color="red",
  14. # colormap="viridis"
  15. )
no colormap viridis

There is a command-line tool that can be used to show
matrix-market or
Harwell-Boeing files:

  1. betterspy msc00726.mtx [out.png]

See betterspy -h for all options.

bp_200 bp_600 Chebyshev2
orani678 rajat19 rdb1250l
rdb3200l west0989 west1505

Installation

betterspy is available from the Python Package
Index
, so simply do

  1. pip install betterspy

to install.

License

This software is published under the GPLv3 license.