def pvwatts_ac(pdc, pdc0, eta_inv_nom=<NUM_LIT>, eta_inv_ref=<NUM_LIT>):
pac0 = eta_inv_nom * pdc0<EOL>zeta = pdc / pdc0<EOL>eta = np.zeros_like(pdc, dtype=float)<EOL>pdc_neq_0 = ~np.equal(pdc, <NUM_LIT:0>)<EOL>eta = eta_inv_nom / eta_inv_ref * (<EOL>- <NUM_LIT>*zeta<EOL>- np.divide(<NUM_LIT>, zeta, out=eta, where=pdc_neq_0)<EOL>+ <NUM_LIT>)<EOL>pac = eta * pdc<EOL>pac = np.minimum(pac0, pac)<EOL>pac = np.maximum(<NUM_LIT:0>, pac)     <EOL>return pac<EOL>
r"""
    Implements NREL's PVWatts inverter model [1]_.

    .. math::

        \eta = \frac{\eta_{nom}}{\eta_{ref}} (-0.0162\zeta - \frac{0.0059}{\zeta} + 0.9858)

    .. math::

        P_{ac} = \min(\eta P_{dc}, P_{ac0})

    where :math:`\zeta=P_{dc}/P_{dc0}` and :math:`P_{dc0}=P_{ac0}/\eta_{nom}`.

    Parameters
    ----------
    pdc: numeric
        DC power.
    pdc0: numeric
        Nameplate DC rating.
    eta_inv_nom: numeric, default 0.96
        Nominal inverter efficiency.
    eta_inv_ref: numeric, default 0.9637
        Reference inverter efficiency. PVWatts defines it to be 0.9637
        and is included here for flexibility.

    Returns
    -------
    pac: numeric
        AC power.

    References
    ----------
    .. [1] A. P. Dobos, "PVWatts Version 5 Manual,"
           http://pvwatts.nrel.gov/downloads/pvwattsv5.pdf
           (2014).