def lp2hp(b, a, wo=<NUM_LIT:1.0>):
a, b = map(atleast_1d, (a, b))<EOL>try:<EOL><INDENT>wo = float(wo)<EOL><DEDENT>except TypeError:<EOL><INDENT>wo = float(wo[<NUM_LIT:0>])<EOL><DEDENT>d = len(a)<EOL>n = len(b)<EOL>if wo != <NUM_LIT:1>:<EOL><INDENT>pwo = pow(wo, numpy.arange(max((d, n))))<EOL><DEDENT>else:<EOL><INDENT>pwo = numpy.ones(max((d, n)), b.dtype.char)<EOL><DEDENT>if d >= n:<EOL><INDENT>outa = a[::-<NUM_LIT:1>] * pwo<EOL>outb = resize(b, (d,))<EOL>outb[n:] = <NUM_LIT:0.0><EOL>outb[:n] = b[::-<NUM_LIT:1>] * pwo[:n]<EOL><DEDENT>else:<EOL><INDENT>outb = b[::-<NUM_LIT:1>] * pwo<EOL>outa = resize(a, (n,))<EOL>outa[d:] = <NUM_LIT:0.0><EOL>outa[:d] = a[::-<NUM_LIT:1>] * pwo[:d]<EOL><DEDENT>return normalize(outb, outa)<EOL>
Transform a lowpass filter prototype to a highpass filter.

Return an analog high-pass filter with cutoff frequency `wo`
from an analog low-pass filter prototype with unity cutoff frequency, in
transfer function ('ba') representation.