In [12]:
# in pure NumPy we can easily define the cost function
x_axis_w = np.linspace(-3,9,500)
y_axis_J = (x_axis_w-3)**2