def xlim_as_gps(func):
@wraps(func)<EOL>def wrapped_func(self, left=None, right=None, **kw):<EOL><INDENT>if right is None and numpy.iterable(left):<EOL><INDENT>left, right = left<EOL><DEDENT>kw['<STR_LIT:left>'] = left<EOL>kw['<STR_LIT:right>'] = right<EOL>gpsscale = self.get_xscale() in GPS_SCALES<EOL>for key in ('<STR_LIT:left>', '<STR_LIT:right>'):<EOL><INDENT>if gpsscale:<EOL><INDENT>try:<EOL><INDENT>kw[key] = numpy.longdouble(str(to_gps(kw[key])))<EOL><DEDENT>except TypeError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT>return func(self, **kw)<EOL><DEDENT>return wrapped_func<EOL>
Wrap ``func`` to handle pass limit inputs through `gwpy.time.to_gps`