'Calculate the individual Hermite functions once and store them in a
dictionary to be reused.'

def _fcache(self, x, y):

    x_terms = (self.x_degree + 1)
    y_terms = (self.y_degree + 1)
    kfunc = {}
    kfunc[0] = np.ones(x.shape)
    kfunc[1] = (2 * x.copy())
    kfunc[x_terms] = np.ones(y.shape)
    kfunc[(x_terms + 1)] = (2 * y.copy())
    for n in range(2, x_terms):
        kfunc[n] = (((2 * x) * kfunc[(n - 1)]) - ((2 * (n - 1)) * kfunc[(n - 2)]))
    for n in range((x_terms + 2), (x_terms + y_terms)):
        kfunc[n] = (((2 * y) * kfunc[(n - 1)]) - ((2 * (n - 1)) * kfunc[(n - 2)]))
    return kfunc
