New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ndv

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ndv

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

  • 0.2.2
  • PyPI
  • Socket score

Maintainers
1

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.

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]

Documentation

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc