'Evaluate the estimated pdf on a set of points.
Parameters
points : (# of dimensions, # of points)-array
Alternatively, a (# of dimensions,) vector can be passed in and
treated as a single point.
Returns
values : (# of points,)-array
The values at each point.
Raises
ValueError : if the dimensionality of the input points is different than
the dimensionality of the KDE.'

def evaluate(self, points):

    points = atleast_2d(points)
    (d, m) = points.shape
    if (d != self.d):
        if ((d == 1) and (m == self.d)):
            points = reshape(points, (self.d, 1))
            m = 1
        else:
            msg = ('points    have    dimension    %s,    dataset    has    dimension    %s' % (d, self.d))
            raise ValueError(msg)
    result = zeros((m,), dtype=float)
    if (m >= self.n):
        for i in range(self.n):
            diff = (self.dataset[:, i, newaxis] - points)
            tdiff = dot(self.inv_cov, diff)
            energy = (sum((diff * tdiff), axis=0) / 2.0)
            result = (result + exp((- energy)))
    else:
        for i in range(m):
            diff = (self.dataset - points[:, i, newaxis])
            tdiff = dot(self.inv_cov, diff)
            energy = (sum((diff * tdiff), axis=0) / 2.0)
            result[i] = sum(exp((- energy)), axis=0)
    result = (result / self._norm_factor)
    return result
