Packages
Click the button to install NumPy and run Python.
import micropip
async def run_numpy(e):
output.text = "Installing NumPy..."
await micropip.install("numpy")
import numpy as np
values = np.array([1, 2, 3, 4])
output.text = f"mean = {values.mean()}"
run.on("click", run_numpy)
← Back to demos