ipydatawidgets

4.3.5 · active · verified Thu Apr 16

ipydatawidgets is a Python library that provides a set of interactive HTML widgets for Jupyter notebooks, designed to facilitate the reuse and efficient transmission of large datasets. Its primary purpose is to offer a standardized way to move array data between the Python kernel and the frontend, enabling multiple widgets to share the same data with a single network synchronization. The current version is 4.3.5, with an infrequent release cadence, the last PyPI release being in June 2023.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to create and use the core `NDArrayWidget` to encapsulate NumPy array data. This widget can then be linked to other ipywidgets-based components that are designed to consume `NDArrayWidget` instances or `DataUnion` types.

import numpy as np
from ipydatawidgets import NDArrayWidget

# Create some raw NumPy data
raw_data = np.random.rand(10, 10, 3).astype(np.float32)

# Wrap the raw data in an NDArrayWidget
data_widget = NDArrayWidget(raw_data)

# The data_widget can now be passed to other widgets that accept NDArrayWidget instances
# For demonstration, we'll just display it (though NDArrayWidget itself doesn't have a complex visual representation out of the box)
data_widget

view raw JSON →