def lqmn(m,n,z):
if not isscalar(m) or (m < <NUM_LIT:0>):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not isscalar(n) or (n < <NUM_LIT:0>):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if not isscalar(z):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>m = int(m)<EOL>n = int(n)<EOL>mm = max(<NUM_LIT:1>,m)<EOL>nn = max(<NUM_LIT:1>,n)<EOL>if iscomplex(z):<EOL><INDENT>q,qd = specfun.clqmn(mm,nn,z)<EOL><DEDENT>else:<EOL><INDENT>q,qd = specfun.lqmn(mm,nn,z)<EOL><DEDENT>return q[:(m+<NUM_LIT:1>),:(n+<NUM_LIT:1>)],qd[:(m+<NUM_LIT:1>),:(n+<NUM_LIT:1>)]<EOL>
Associated Legendre functions of the second kind, Qmn(z) and its
    derivative, ``Qmn'(z)`` of order m and degree n.  Returns two
    arrays of size ``(m+1, n+1)`` containing ``Qmn(z)`` and ``Qmn'(z)`` for
    all orders from ``0..m`` and degrees from ``0..n``.

    z can be complex.