def CurrentAmplifierTwoPort(G, Zi, Zo, Z0=50.0):
    """CurrentAmplifierTwoPort
    Two port current amplifier
    @param G float current gain
    @param Zi float or complex input impedance
    @param Zo float or complex output impedance
    @param Z0 (optional) float reference impedance (defaults to 50 ohms)
    @return list of list s-parameter matrix for a current amplifier
    The two port current amplifier is the same as the three port current amplifier with
    port 3 grounded.

    The current sense element senses the current entering port 1
    with a series resistance in the current sense path of Zi.

    The current generated by the amplifier exits port 2 and is
    shunted with Zo.
    """
    return [[(Zi - Z0) / (Zi + Z0), 0.0], [2.0 * G * Zo * Z0 / ((Zi + Z0) *
        (Zo + Z0)), (Zo - Z0) / (Zo + Z0)]]
