def beale(xy):
x, y = xy<EOL>r1 = x - x*y<EOL>r2 = x - x*y*y<EOL>r3 = x - x*y*y*y<EOL>return np.array([r1, r2, r3])<EOL>
The Beale function, as a set of residuals (cost = sum(residuals**2))

The standard Beale's function is with data as [1.5, 2.25, 2.625],
and has a global minima at (3, 0.5). Beale's function is a coupled
model, linear in x and quartic in y. Its data-space dimension (3) is
greater than its model-space dimension (2).

Parameters
----------
    - xy : 2-element list-like
        The x,y parameters of the model.

Returns
-------
    3-element list-like
        The residuals of the model.