@@ -47,7 +47,7 @@ def __init__(self, break_eps=1.1, break_metric='chebyshev',
4747 Distance scale used in the break up procedure
4848 break_metric : str, default 'chebyshev'
4949 Distance metric used in the break up produce
50- break_classes : List[int], default
50+ break_classes : List[int], default
5151 [SHOWR_SHP, TRACK_SHP, MICHL_SHP, DELTA_SHP]
5252 Classes to run DBSCAN on to break up
5353 """
@@ -141,12 +141,12 @@ def _process(self, clust_label, seg_label, seg_pred, ghost_pred=None):
141141 if not len (clust_label ):
142142 if ghost_pred is None :
143143 shape = (len (coords ), num_cols )
144- dummy_labels = - 1 * self ._ones (shape )
144+ dummy_labels = - self ._ones (shape )
145145 dummy_labels [:, :VALUE_COL ] = coords
146146
147147 else :
148148 shape = (len (deghost_index ), num_cols )
149- dummy_labels = - 1 * self ._ones (shape )
149+ dummy_labels = - self ._ones (shape )
150150 dummy_labels [:, :VALUE_COL ] = coords [deghost_index ]
151151
152152 return dummy_labels
@@ -159,7 +159,7 @@ def _process(self, clust_label, seg_label, seg_pred, ghost_pred=None):
159159 seg_pred = seg_pred_long
160160
161161 # Prepare new labels
162- new_label = - 1. * self ._ones ((len (coords ), num_cols ))
162+ new_label = - self ._ones ((len (coords ), num_cols ))
163163 new_label [:, :VALUE_COL ] = coords
164164
165165 # Check if the segment labels and predictions are compatible. If they are
@@ -172,7 +172,7 @@ def _process(self, clust_label, seg_label, seg_pred, ghost_pred=None):
172172 true_deghost = seg_label < GHOST_SHP
173173 seg_mismatch = ~ compat_mat [(seg_pred , seg_label )]
174174 new_label [true_deghost ] = clust_label
175- new_label [seg_mismatch & true_deghost , VALUE_COL :] = - self ._ones (1 )
175+ new_label [true_deghost & seg_mismatch , VALUE_COL :] = - self ._ones (1 )
176176
177177 # For mismatched predictions, attempt to find a touching instance of the
178178 # same class to assign it sensible cluster labels.
@@ -182,7 +182,7 @@ def _process(self, clust_label, seg_label, seg_pred, ghost_pred=None):
182182 continue
183183
184184 # Restrict to points in this class that have incompatible segment
185- # labels. Track points do not mix, EM points are allowed to.
185+ # labels. Track points do not mix, EM points are allowed to.
186186 bad_index = self ._where (
187187 (seg_pred == s ) & (~ true_deghost | seg_mismatch ))[0 ]
188188 if len (bad_index ) == 0 :
@@ -211,7 +211,7 @@ def _process(self, clust_label, seg_label, seg_pred, ghost_pred=None):
211211 if tagged_voxels_count > 0 :
212212 # Use the label of the touching true voxel
213213 additional_clust_label = self ._cat (
214- [X_pred [select_index ],
214+ [X_pred [select_index ],
215215 X_true [closest_ids [select_index ], VALUE_COL :]], 1 )
216216 new_label [bad_index [select_index ]] = additional_clust_label
217217
0 commit comments