diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-05-12 22:31:42 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-05-12 22:31:42 +0200 |
commit | c5fca5477cc6fff77acedf7b5324eb5f8b417ed3 (patch) | |
tree | 50687f72096e7185492697a0c298c1261b151e69 /src/python/gudhi/point_cloud/dtm.py | |
parent | c87a1f10e048477d210ae0abd657da87bba1102a (diff) |
More test
Diffstat (limited to 'src/python/gudhi/point_cloud/dtm.py')
-rw-r--r-- | src/python/gudhi/point_cloud/dtm.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/python/gudhi/point_cloud/dtm.py b/src/python/gudhi/point_cloud/dtm.py index 4454d8a2..88f197e7 100644 --- a/src/python/gudhi/point_cloud/dtm.py +++ b/src/python/gudhi/point_cloud/dtm.py @@ -89,7 +89,7 @@ class DTMDensity: weights (numpy.array): weights of each of the k neighbors, optional. They are supposed to sum to 1. q (float): order used to compute the distance to measure. Defaults to dim. dim (float): final exponent representing the dimension. Defaults to the dimension, and must be specified - when the dimension cannot be read from the input (metric="neighbors" or metric="precomputed"). + when the dimension cannot be read from the input (metric is "neighbors" or "precomputed"). normalize (bool): normalize the density so it corresponds to a probability measure on ℝᵈ. Only available for the Euclidean metric, defaults to False. n_samples (int): number of sample points used for fitting. Only needed if `normalize` is True and @@ -146,7 +146,7 @@ class DTMDensity: if q is None: q = dim if self.params["metric"] == "neighbors": - distances = X[:, : self.k] + distances = np.asarray(X)[:, : self.k] else: distances = self.knn.transform(X) distances = distances ** q |