Skip to main content

Simple, fast-loading, n-dimensional array viewer, with minimal dependencies.

Project description

ndv

License PyPI Python Version CI codecov

Simple, fast-loading, asynchronous, n-dimensional array viewer, with minimal dependencies.

Works in Qt, Jupyter, or wxPython.

import ndv

data = ndv.data.cells3d()  # or any arraylike object
ndv.imshow(data)

Montage

ndv.imshow() creates an instance of ndv.ArrayViewer, which you can also use directly:

import ndv

viewer = ndv.ArrayViewer(data)
viewer.show()
ndv.run_app()

[!TIP] To embed the viewer in a broader Qt or wxPython application, you can access the viewer's widget attribute and add it to your layout.

Documentation

For more information, and complete API reference, see the documentation.

Features

  • ⚡️ fast to import, fast to show
  • 🪶 minimal dependencies
  • 📦 supports arbitrary number of dimensions
  • 🥉 2D/3D view canvas
  • 🌠 supports VisPy or pygfx backends
  • 🛠️ support Qt, wx, or Jupyter GUI frontends
  • 🎨 colormaps provided by cmap
  • 🏷️ supports named dimensions and categorical coordinate values (WIP)
  • 🦆 supports most array types, including:
    • numpy.ndarray
    • cupy.ndarray
    • dask.array.Array
    • jax.Array
    • pyopencl.array.Array
    • sparse.COO
    • tensorstore.TensorStore (supports named dimensions)
    • torch.Tensor (supports named dimensions)
    • xarray.DataArray (supports named dimensions)
    • zarr (named dimensions WIP)

See examples for each of these array types in examples

[!NOTE] You can add support for any custom storage class by subclassing ndv.DataWrapper and implementing a couple methods. (This doesn't require modifying ndv, but contributions of new wrappers are welcome!)

Installation

Because ndv supports many combinations of GUI and graphics frameworks, you must install it along with additional dependencies for your desired backend.

See the installation guide for complete details.

To just get started quickly using Qt and vispy:

pip install ndv[qt]

For Jupyter with vispy, (no Qt or wxPython):

pip install ndv[jup]

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

ndv-0.5.0.tar.gz (205.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ndv-0.5.0-py3-none-any.whl (159.8 kB view details)

Uploaded Python 3

File details

Details for the file ndv-0.5.0.tar.gz.

File metadata

  • Download URL: ndv-0.5.0.tar.gz
  • Upload date:
  • Size: 205.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ndv-0.5.0.tar.gz
Algorithm Hash digest
SHA256 899b08f2911f83ea4a4b522c64d56ea79141bde56f02c0fe86ed2bd022b63d2a
MD5 9781394411078f03b17cbef311729b3d
BLAKE2b-256 2476526c57540a51981e3d0e403ee76cd54500ff97c6033f554409bee3320558

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndv-0.5.0.tar.gz:

Publisher: ci.yml on pyapp-kit/ndv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndv-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: ndv-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 159.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ndv-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3636a33a6946c7cb378c325a4af7444b33e02502fc4d3019dcb77d84fbc95da2
MD5 ea7f6affc793a1832ee108c33742a308
BLAKE2b-256 a192f322ea325276467869174119ce6567e36bb06ae231637122089fbe04d962

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndv-0.5.0-py3-none-any.whl:

Publisher: ci.yml on pyapp-kit/ndv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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