Calculate the partial derivatives
        
        Uses sympy.utilities.lambdify to convert equation into
        a function that can be easily computed.
        
        Raises:
          MissingEquationError: if method is called before equation is
            attached.

def _calc_partials(self):
        """Calculate the partial derivatives
        
        Uses sympy.utilities.lambdify to convert equation into
        a function that can be easily computed.
        
        Raises:
          MissingEquationError: if method is called before equation is
            attached.
        """
        if not self.equation:
            raise self.MissingEquationError('No equation attached')
        
        x, y = sympy.symbols('x,y')
        compute_func = sympy.utilities.lambdify((x, y), self.equation)
        X, Y = np.meshgrid(self.xrange, self.yrange)
        DX, DY = np.meshgrid(np.zeros(len(self.xrange)),
                             np.zeros(len(self.yrange)))
        
        # Iterate through grid and compute function value at each point
        # If value cannot be computed, default to 0
        # If value can be computed, scale by sqrt of the magnitude
        for i, a in enumerate(self.xrange):
            for j, b in enumerate(self.yrange):
                dx = 1
                try:
                    dy = compute_func(a, b)
                    n = sqrt(dx**2 + dy**2)
                    dy /= sqrt(n)
                    dx /= sqrt(n)
                    DX[j][i] = dx
                    DY[j][i] = dy
                except (ValueError, ZeroDivisionError):
                    pass
        return X, Y, DX, DY