def lqmn(m, n, z):
 if ((not isscalar(m)) or (m < 0)):
  raise ValueError('m must be a non-negative integer.')
 if ((not isscalar(n)) or (n < 0)):
  raise ValueError('n must be a non-negative integer.')
 if (not isscalar(z)):
  raise ValueError('z must be scalar.')
 m = int(m)
 n = int(n)
 mm = max(1, m)
 nn = max(1, n)
 if iscomplex(z):
  (q, qd) = specfun.clqmn(mm, nn, z)
 else:
  (q, qd) = specfun.lqmn(mm, nn, z)
 return (q[:(m + 1), :(n + 1)], qd[:(m + 1), :(n + 1)])

def lqmn ( m , n , z ) : if ( ( not isscalar ( m ) ) or ( m < 0 ) ) : raise ValueError ( 'm must be a non-negative integer.' ) if ( ( not isscalar ( n ) ) or ( n < 0 ) ) : raise ValueError ( 'n must be a non-negative integer.' ) if ( not isscalar ( z ) ) : raise ValueError ( 'z must be scalar.' ) m = int ( m ) n = int ( n ) mm = max ( 1 , m ) nn = max ( 1 , n ) if iscomplex ( z ) : ( q , qd ) = specfun . clqmn ( mm , nn , z ) else : ( q , qd ) = specfun . lqmn ( mm , nn , z ) return ( q [ : ( m + 1 ) , : ( n + 1 ) ] , qd [ : ( m + 1 ) , : ( n + 1 ) ] )
sequence of associated legendre functions of the second kind .