def euler(n=10):
    """
    Function to compute Euler's number, :math:`e` using a Taylor series

    .. math::

        e = 1 + \\sum_n^\\infty \\frac{1}{n!}

    Parameters
    ----------
    n : int, Optional, default: 10
        Order of expansion for the Taylor series

    Returns
    -------
    e : float
        Computed value of Euler's number
    """

    if n < 0:
        raise ValueError("Only positive integers are allowed")

    e = 1.0
    frac = 1.0

    for i in range(1, n + 1):
        frac *= i
        e += 1.0 / frac

    return e