def qn(phi, *n):
phi = np.ravel(phi)<EOL>n = np.asarray(n)<EOL>i_n_phi = np.zeros((n.size, phi.size), dtype=complex)<EOL>np.outer(n, phi, out=i_n_phi.imag)<EOL>qn = np.exp(i_n_phi, out=i_n_phi).sum(axis=<NUM_LIT:1>)<EOL>if qn.size == <NUM_LIT:1>:<EOL><INDENT>qn = qn[<NUM_LIT:0>]<EOL><DEDENT>return qn<EOL>
Calculate the complex flow vector `Q_n`.

:param array-like phi: Azimuthal angles.

:param int n: One or more harmonics to calculate.

:returns:
    A single complex number if only one ``n`` was given or a complex array
    for multiple ``n``.