def poly_below(xmin, xs, ys):
 if any((isinstance(var, np.ma.MaskedArray) for var in [xs, ys])):
  numpy = np.ma
 else:
  numpy = np
 xs = numpy.asarray(xs)
 ys = numpy.asarray(ys)
 Nx = len(xs)
 Ny = len(ys)
 if (Nx != Ny):
  raise ValueError(u"'xs' and 'ys' must have the same length")
 x = (xmin * numpy.ones((2 * Nx)))
 y = numpy.ones((2 * Nx))
 x[:Nx] = xs
 y[:Nx] = ys
 y[Nx:] = ys[::(-1)]
 return (x, y)

def poly_below ( xmin , xs , ys ) : if any ( ( isinstance ( var , np . ma . MaskedArray ) for var in [ xs , ys ] ) ) : numpy = np . ma else : numpy = np xs = numpy . asarray ( xs ) ys = numpy . asarray ( ys ) Nx = len ( xs ) Ny = len ( ys ) if ( Nx != Ny ) : raise ValueError ( u"'xs' and 'ys' must have the same length" ) x = ( xmin * numpy . ones ( ( 2 * Nx ) ) ) y = numpy . ones ( ( 2 * Nx ) ) x [ : Nx ] = xs y [ : Nx ] = ys y [ Nx : ] = ys [ : : ( - 1 ) ] return ( x , y )
given a sequence of *xs* and *ys* .