def rosenbrock(tensor):
    """
    Compute Rosenbrock function.
    # https://en.wikipedia.org/wiki/Test_functions_for_optimization
    """
    x, y = tensor
    return (1 - x) ** 2 + 100 * (y - x ** 2) ** 2