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.1.dev2.tar.gz (323.6 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.1.dev2-py3-none-any.whl (252.1 kB view details)

Uploaded Python 3

File details

Details for the file ndv-0.5.1.dev2.tar.gz.

File metadata

  • Download URL: ndv-0.5.1.dev2.tar.gz
  • Upload date:
  • Size: 323.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ndv-0.5.1.dev2.tar.gz
Algorithm Hash digest
SHA256 0be79c894963c25d4770e842f4e4122c35f3ec75dc6c5f8da3d52751daa2b859
MD5 2637a62f42db37c9d9e3d5908a7f19a0
BLAKE2b-256 b6b70bc60ef0a29b938f7fec771437762cd961a5ccd03581d640aedb99f8123e

See more details on using hashes here.

File details

Details for the file ndv-0.5.1.dev2-py3-none-any.whl.

File metadata

  • Download URL: ndv-0.5.1.dev2-py3-none-any.whl
  • Upload date:
  • Size: 252.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ndv-0.5.1.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 9aef20bddb1a404225ee64d4694365508a0ebaa6e0c374b3c91413be7d94259e
MD5 773482d89209128885d5e325c9ae6745
BLAKE2b-256 0d958505d83f6a236cf3734123b0e139fa1f3ded2963f03a5cbbe4158f311127

See more details on using hashes here.

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