The SciPy workbench

Pyodide, preloaded np and plt, files, and privacy.

SciPy rides on NumPy. The workbench preloads np and plt. Import scipy modules in the script.

Goal

Print versions and draw a tiny line.

import scipy
print('numpy', np.__version__)
print('scipy', scipy.__version__)
x = np.linspace(0, 1, 5)
plt.plot(x, x ** 2)
plt.title('x^2')
plt.show()
print('plotted')