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.

Source Distribution

betterspy-0.1.6.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

betterspy-0.1.6-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file betterspy-0.1.6.tar.gz.

File metadata

  • Download URL: betterspy-0.1.6.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for betterspy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 23da2fc96fc5795a0e92d255f692bc64f8564bf22260001c1f96e220cdf039b8
MD5 e5d707458af8d25489418c6632bd0ea6
BLAKE2b-256 e2180066c56afb8b8a0e5ca9bbdbd262cca5884ff4db659b084073153b0693dd

See more details on using hashes here.

File details

Details for the file betterspy-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: betterspy-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for betterspy-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b8bc0fb642ed57d1c2ae1cf06e9ba5a1a16e7f6bd0acfea39dd4da206fe48b0f
MD5 b073f63c374872d75ed828734a8ba8f2
BLAKE2b-256 5719c13a2800430bd7776f8c2025f659da54fe046bd92758cb74d955964dd677

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page