diff --git a/.travis.yml b/.travis.yml index eb7eabc..3fd9f36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ language: python python: - '3.5' - '3.6' - - 3.7-dev + - '3.7' + - '3.8' cache: - pip - apt @@ -29,4 +30,3 @@ deploy: branch: master after_success: - coveralls - diff --git a/graphtools/graphs.py b/graphtools/graphs.py index 3d6fbe7..2caa431 100644 --- a/graphtools/graphs.py +++ b/graphtools/graphs.py @@ -288,7 +288,7 @@ def _check_duplicates(self, distances, indices): "Detected zero distance between {} pairs of samples. " "Consider removing duplicates to avoid errors in " "downstream processing.".format( - np.sum(np.sum(distances[:, 1:] == 0)) + np.sum(np.sum(distances[:, 1:] == 0)) // 2 ), RuntimeWarning, ) @@ -408,7 +408,7 @@ def build_kernel_to_data( search_knn = min(search_knn * self.search_multiplier, knn_max) if search_knn > self.data_nu.shape[0] / 2: knn_tree = NearestNeighbors( - search_knn, algorithm="brute", n_jobs=self.n_jobs + n_neighbors=search_knn, algorithm="brute", n_jobs=self.n_jobs ).fit(self.data_nu) if len(update_idx) > 0: if search_knn == knn_max: diff --git a/graphtools/version.py b/graphtools/version.py index 0f228f2..5197c5f 100644 --- a/graphtools/version.py +++ b/graphtools/version.py @@ -1 +1 @@ -__version__ = "1.5.1" +__version__ = "1.5.2" diff --git a/test/test_estimator.py b/test/test_estimator.py index 179abda..c66aceb 100644 --- a/test/test_estimator.py +++ b/test/test_estimator.py @@ -95,7 +95,7 @@ def test_pca(): def test_anndata_input(): X = np.random.normal(0, 1, (10, 2)) E = Estimator(verbose=0) - E.fit(X) + E.fit(X.astype(np.float32)) E2 = Estimator(verbose=0) E2.fit(anndata.AnnData(X)) np.testing.assert_allclose( diff --git a/test/test_knn.py b/test/test_knn.py index d66e6f8..fe47c07 100644 --- a/test/test_knn.py +++ b/test/test_knn.py @@ -51,7 +51,7 @@ def test_duplicate_data(): RuntimeWarning, r"Detected zero distance between samples ([0-9and,\s]*). Consider removing duplicates to avoid errors in downstream processing.", ): - build_graph(np.vstack([data, data[:10]]), n_pca=20, decay=10, thresh=1e-4) + build_graph(np.vstack([data, data[:9]]), n_pca=20, decay=10, thresh=1e-4) def test_duplicate_data_many():