https://github.com/pyapp-kit/ndv
Simple, fast-loading, n-dimensional array viewer with minimal dependencies.
https://github.com/pyapp-kit/ndv
arrays python visualization
Last synced: 10 days ago
JSON representation
Simple, fast-loading, n-dimensional array viewer with minimal dependencies.
- Host: GitHub
- URL: https://github.com/pyapp-kit/ndv
- Owner: pyapp-kit
- License: bsd-3-clause
- Created: 2024-06-07T20:55:54.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-26T20:51:03.000Z (19 days ago)
- Last Synced: 2025-03-29T10:08:28.704Z (17 days ago)
- Topics: arrays, python, visualization
- Language: Python
- Homepage: https://pyapp-kit.github.io/ndv/
- Size: 23.1 MB
- Stars: 63
- Watchers: 5
- Forks: 8
- Open Issues: 52
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-scientific-image-analysis - ndv - -> (đģ Visualization / Software tools)
- awesome-scientific-image-analysis - ndv - -> (đģ Visualization)
README
# ndv
[](https://github.com/pyapp-kit/ndv/raw/main/LICENSE)
[](https://pypi.org/project/ndv)
[](https://python.org)
[](https://github.com/pyapp-kit/ndv/actions/workflows/ci.yml)
[](https://codecov.io/gh/pyapp-kit/ndv)Simple, fast-loading, asynchronous, n-dimensional array viewer, with minimal
dependencies.Works in Qt, Jupyter, or wxPython.
```python
import ndvdata = ndv.data.cells3d() # or any arraylike object
ndv.imshow(data)
```
[`ndv.imshow()`](https://pyapp-kit.github.io/ndv/latest/reference/ndv/#ndv.imshow)
creates an instance of
[`ndv.ArrayViewer`](https://pyapp-kit.github.io/ndv/latest/reference/ndv/controllers/#ndv.controllers.ArrayViewer),
which you can also use directly:```python
import ndvviewer = 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`](https://pyapp-kit.github.io/ndv/latest/reference/ndv/controllers/#ndv.controllers.ArrayViewer.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](https://github.com/vispy/vispy) or
[pygfx](https://github.com/pygfx/pygfx) backends
- đ ī¸ support [Qt](https://doc.qt.io), [wx](https://www.wxpython.org), or
[Jupyter](https://jupyter.org) GUI frontends
- đ¨ colormaps provided by [cmap](https://cmap-docs.readthedocs.io/)
- đˇī¸ 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](https://github.com/pyapp-kit/ndv/tree/main/examples)> [!NOTE]
> *You can add support for any custom storage class by subclassing
> `ndv.DataWrapper` and [implementing a couple
> methods](https://github.com/pyapp-kit/ndv/blob/main/examples/custom_store.py).
> (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](https://pyapp-kit.github.io/ndv/latest/install/) for
complete details.To just get started quickly using Qt and vispy:
```python
pip install ndv[qt]
```For Jupyter with vispy, (no Qt or wxPython):
```python
pip install ndv[jup]
```## Documentation
For more information, and complete API reference, see the
[documentation](https://pyapp-kit.github.io/ndv/).