Skip to main content

Show sparsity patterns of sparse matrices

Project description

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:

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 or Harwell-Boeing files:

betterspy msc00726.mtx [out.png]

See betterspy -h for all options.

Gallery

bp_200 bp_600 Chebyshev2
orani678 rajat19 rdb1250l
rdb3200l west0989 west1505

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.

Files for betterspy, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size betterspy-0.1.6-py3-none-any.whl (18.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size betterspy-0.1.6.tar.gz (18.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page