def eps(net_income, preferred_dividends, shares_outstanding):
    """Computes basic earnings per share.

    @params
    -------
    net_income: net income
    preferred_dividends: preferred dividends
    shares_outstanding: weighted average number of ordinary shares outstanding

    returns
    -------
    Earnings per share, int or float

    explanation
    -----------

    """
    return (net_income - preferred_dividends) / shares_outstanding
