'Calculate the resulting uncertainty.
Parameters
operation : callable
see :meth:`NDArithmeticMixin._arithmetic` parameter description.
operand : `NDData`-like instance
The second operand wrapped in an instance of the same class as
self.
result : `~astropy.units.Quantity` or `~numpy.ndarray`
The result of :meth:`NDArithmeticMixin._arithmetic_data`.
correlation : number or `~numpy.ndarray`
see :meth:`NDArithmeticMixin.add` parameter description.
kwds :
Additional parameters.
Returns
result_uncertainty : `NDUncertainty` subclass instance or None
The resulting uncertainty already saved in the same `NDUncertainty`
subclass that ``self`` had (or ``operand`` if self had no
uncertainty). ``None`` only if both had no uncertainty.'

def _arithmetic_uncertainty(self, operation, operand, result, correlation, **kwds):

    if ((self.uncertainty is not None) and (not isinstance(self.uncertainty, NDUncertainty))):
        raise TypeError(u'Uncertainty    propagation    is    only    defined    for    subclasses    of    NDUncertainty.')
    if ((operand.uncertainty is not None) and (not isinstance(operand.uncertainty, NDUncertainty))):
        raise TypeError(u'Uncertainty    propagation    is    only    defined    for    subclasses    of    NDUncertainty.')
    if ((self.uncertainty is None) and (operand.uncertainty is None)):
        return None
    elif (self.uncertainty is None):
        self.uncertainty = operand.uncertainty.__class__(None)
        result_uncert = self.uncertainty.propagate(operation, operand, result, correlation)
        self.uncertainty = None
        return result_uncert
    elif (operand.uncertainty is None):
        operand.uncertainty = self.uncertainty.__class__(None)
        result_uncert = self.uncertainty.propagate(operation, operand, result, correlation)
        operand.uncertainty = None
        return result_uncert
    else:
        return self.uncertainty.propagate(operation, operand, result, correlation)
