def bishop88_mpp(photocurrent, saturation_current, resistance_series,<EOL>resistance_shunt, nNsVth, method='<STR_LIT>'):
<EOL>args = (photocurrent, saturation_current, resistance_series,<EOL>resistance_shunt, nNsVth)<EOL>voc_est = estimate_voc(photocurrent, saturation_current, nNsVth)<EOL>def fmpp(x, *a):<EOL><INDENT>return bishop88(x, *a, gradients=True)[<NUM_LIT:6>]<EOL><DEDENT>if method.lower() == '<STR_LIT>':<EOL><INDENT>vec_fun = np.vectorize(<EOL>lambda voc, iph, isat, rs, rsh, gamma:<EOL>brentq(fmpp, <NUM_LIT:0.0>, voc, args=(iph, isat, rs, rsh, gamma))<EOL>)<EOL>vd = vec_fun(voc_est, *args)<EOL><DEDENT>elif method.lower() == '<STR_LIT>':<EOL><INDENT>args, v0 = _prepare_newton_inputs((), args, voc_est)<EOL>vd = newton(<EOL>func=fmpp, x0=v0,<EOL>fprime=lambda x, *a: bishop88(x, *a, gradients=True)[<NUM_LIT:7>], args=args<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise NotImplementedError("<STR_LIT>" % method)<EOL><DEDENT>return bishop88(vd, *args)<EOL>
Find max power point.

Parameters
----------
photocurrent : numeric
    photogenerated current (Iph or IL) in amperes [A]
saturation_current : numeric
    diode dark or saturation current (Io or Isat) in amperes [A]
resistance_series : numeric
    series resistance (Rs) in ohms
resistance_shunt : numeric
    shunt resistance (Rsh) in ohms
nNsVth : numeric
    product of diode ideality factor (n), number of series cells (Ns), and
    thermal voltage (Vth = k_b * T / q_e) in volts [V]
method : str
    one of two optional search methods: either ``'brentq'``, a reliable and
    bounded method or ``'newton'`` which is the default.

Returns
-------
OrderedDict or pandas.DataFrame
    max power current ``i_mp`` [A], max power voltage ``v_mp`` [V], and
    max power ``p_mp`` [W]