'Evaluate the density model on the data.
Parameters
X : array_like, shape (n_samples, n_features)
An array of points to query.  Last dimension should match dimension
of training data (n_features).
Returns
density : ndarray, shape (n_samples,)
The array of log(density) evaluations.'

def score_samples(self, X):

    X = check_array(X, order='C', dtype=DTYPE)
    N = self.tree_.data.shape[0]
    atol_N = (self.atol * N)
    log_density = self.tree_.kernel_density(X, h=self.bandwidth, kernel=self.kernel, atol=atol_N, rtol=self.rtol, breadth_first=self.breadth_first, return_log=True)
    log_density -= np.log(N)
    return log_density
