From b43d7d0d9229116359d89e8ff3bbeb29af9ead95 Mon Sep 17 00:00:00 2001 From: Xing Date: Sun, 28 Apr 2019 15:16:17 -0400 Subject: [PATCH] Revert "MNT Redundant code in optics (#13462)" This reverts commit 534e271ee972df1abc2907235303dc2ed65f8a3a. --- sklearn/cluster/optics_.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sklearn/cluster/optics_.py b/sklearn/cluster/optics_.py index c947d12fb8f8e..828843a3ec2dd 100755 --- a/sklearn/cluster/optics_.py +++ b/sklearn/cluster/optics_.py @@ -465,7 +465,8 @@ def _set_reach_dist(core_distances_, reachability_, predecessor_, return_distance=False)[0] # Getting indices of neighbors that have not been processed - unproc = np.compress(~np.take(processed, indices), indices) + unproc = np.compress((~np.take(processed, indices)).ravel(), + indices, axis=0) # Neighbors of current point are already processed. if not unproc.size: return