def offset_line(y, yerr):
 if (cbook.is_numlike(yerr) or (cbook.iterable(yerr) and (len(yerr) == len(y)))):
  ymin = (y - yerr)
  ymax = (y + yerr)
 elif (len(yerr) == 2):
  (ymin, ymax) = ((y - yerr[0]), (y + yerr[1]))
 else:
  raise ValueError(u'yerr must be scalar, 1xN or 2xN')
 return (ymin, ymax)

def offset_line ( y , yerr ) : if ( cbook . is_numlike ( yerr ) or ( cbook . iterable ( yerr ) and ( len ( yerr ) == len ( y ) ) ) ) : ymin = ( y - yerr ) ymax = ( y + yerr ) elif ( len ( yerr ) == 2 ) : ( ymin , ymax ) = ( ( y - yerr [ 0 ] ) , ( y + yerr [ 1 ] ) ) else : raise ValueError ( u'yerr must be scalar, 1xN or 2xN' ) return ( ymin , ymax )
offsets an array *y* by +/- an error and returns a tuple .