This extension adds a lightweight hover and context menu that let you inspect DataArray
shape info and trigger interactive features provided by ERLabPy directly from Jupyter notebooks.
Features
When hovering over a variable name in a Python cell of a Jupyter notebook, if the
variable is an xarray.DataArray, the hover shows its name and dimensions, along with
actions to:
Watch/Show the DataArray in the ERLab ImageTool.
Unwatch the DataArray.
Open the DataArray in the ImageTool Manager.
Usage
Open a Jupyter notebook with a Python kernel.
Hover over a variable name in a Python cell that is an xarray.DataArray.
You will see the hover with shape info and actions.
Alternatively, right-click the variable name to access the same actions from the
context menu.
Commands
erlab.watch - Watch a DataArray (or show it if already watched).
erlab.unwatch - Stop watching a DataArray.
erlab.manager - Open the DataArray in the ImageTool Manager.
Requirements
VS Code with the Jupyter extension installed.
A running Python kernel for the notebook.
The erlab Python package available in that kernel.
Notes
Hover and context actions run code in the active kernel.
The extension does not execute if erlab is not installed.