def poly_between(x, ylower, yupper):
 if any((isinstance(var, np.ma.MaskedArray) for var in [ylower, yupper, x])):
  numpy = np.ma
 else:
  numpy = np
 Nx = len(x)
 if (not cbook.iterable(ylower)):
  ylower = (ylower * numpy.ones(Nx))
 if (not cbook.iterable(yupper)):
  yupper = (yupper * numpy.ones(Nx))
 x = numpy.concatenate((x, x[::(-1)]))
 y = numpy.concatenate((yupper, ylower[::(-1)]))
 return (x, y)

def poly_between ( x , ylower , yupper ) : if any ( ( isinstance ( var , np . ma . MaskedArray ) for var in [ ylower , yupper , x ] ) ) : numpy = np . ma else : numpy = np Nx = len ( x ) if ( not cbook . iterable ( ylower ) ) : ylower = ( ylower * numpy . ones ( Nx ) ) if ( not cbook . iterable ( yupper ) ) : yupper = ( yupper * numpy . ones ( Nx ) ) x = numpy . concatenate ( ( x , x [ : : ( - 1 ) ] ) ) y = numpy . concatenate ( ( yupper , ylower [ : : ( - 1 ) ] ) ) return ( x , y )
given a sequence of *x* .