def error(self):
        """
        Error associated with the data as a two element tuple of the form `(x_error, y_error)`.

        Both `x_error` and `y_error` is a [`numpy.ndarray`][1] or `None`.

        The array dimensions depend on how the error is specified:

        1. Symmetric constant error is a zero dimensional array: `error`.
        2. Asymmetric constant error is a one dimensional array: `[lower_error, upper_error]`.
        3. Symmetric error which varies for each point is an array with length equal
          to the number of points; each element is a zero dimensional array: `error`
        4. Asymmetric error which varies for each point is an array with length equal
          to the number of points; each element is a one dimensional array: `[lower_error, upper_error]`.

        This property can be set manually. If setting constant errors (cases 1 and 2 above),
        it is not necessary to explicitly use [`numpy.ndarray`][1] as the type will be converted automatically.

        For error that varies at each point (cases 3 and 4 above),
        the errors can be loaded from the file given by `scipy_data_fitting.Data.path`
        setting `scipy_data_fitting.Data.error_columns`.

        Defaults to `(None, None)` unless `scipy_data_fitting.Data.error_columns` is set,
        in which case this will be set on first access by calling `scipy_data_fitting.Data.load_error`.

        When loaded from file, the x and y values will be scaled according
        to `scipy_data_fitting.Data.scale`.

        Examples:

            #!python
            # (x_error, y_error)
            (0.1, 0.5)

            # (x_error, no y_error)
            (0.1, None)

            # ([x_lower_error, x_upper_error], y_error)
            ([0.1, 0.5], 2)

            # ([x_lower_error, x_upper_error], [y_lower_error, y_upper_error])
            ([0.1, 0.5], [2, 0.5])

        [1]: http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html
        """
        if not hasattr(self, '_error'):
            if any(v is not None for v in self.error_columns):
                self._error = self.load_error()
            else:
                return (None, None)
        return self._error