<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def limits(self):
 """ Limits to use for the independent variable whenever creating a linespace, plot, etc. Defaults to `(-x, x)` where `x` is the largest absolute value of the data corresponding to the independent variable. If no such values are negative, defaults to `(0, x)` instead. """

        if not hasattr(self, '_limits'):
            xmax = max(abs(self.data.array[0]))
            xmin = min(self.data.array[0])

            x_error = self.data.error[0]
            if isinstance(x_error, numpy.ndarray):
                if x_error.ndim == 0: xmax = xmax + x_error

            if xmin < 0:
                self._limits = (-xmax, xmax)
            else:
                self._limits = (0, xmax)

        return self._limits