
Matrix
by marimo team
An interactive matrix editor for manipulating grid data.
About this notebook
This notebook demonstrates marimo's mo.ui.matrix widget with NumPy. The widget's initial value is a 3x3 identity matrix from np.eye(3), and each entry appears as an editable field in the notebook.
Edit any entry, and marimo re-runs every cell that reads the widget's value. A second cell converts that value to a NumPy array with np.asarray and displays the result, so the array always matches the current entries.
The notebook declares its dependencies in inline script metadata: marimo and NumPy. A setup cell imports both libraries once, and the two remaining cells hold the widget and the array output.











