human
Complete this python program:
def explnPrime(x):
assistant
#Here is the Python code you requested.

    """This function is the first derivative of the expln function (above).
    It is needed for the backward pass of the module.
    """
    def f(val):
        if (val < 0):
            return exp(val)
        else:
            return (1.0 / (val + 1.0))
    try:
        result = array(list(map(f, x)))
    except TypeError:
        result = array(f(x))
    return result