Make a lambda function which converts an single external (constained)
    parameter to a internal (uncontrained) parameter.

def _external2internal_lambda(bound):
    """ 
    Make a lambda function which converts an single external (constained)
    parameter to a internal (uncontrained) parameter.
    """
    lower, upper = bound
    
    if lower is None and upper is None: # no constraints
        return lambda x: x
    elif upper is None:     # only lower bound
        return lambda x: sqrt((x - lower + 1.)**2 - 1)
    elif lower is None:     # only upper bound
        return lambda x: sqrt((x - upper + 1.)**2 - 1)
    else:
        return lambda x: arcsin((2. * (x - lower) / (upper - lower)) - 1.)