Skip to content

Commit c1dfd25

Browse files
fix new black requirements (#118)
1 parent 4e453eb commit c1dfd25

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sklearn_extra/cluster/_k_medoids.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def _check_nonnegative_int(self, value, desc, strict=True):
152152
)
153153

154154
def _check_init_args(self):
155-
"""Validates the input arguments. """
155+
"""Validates the input arguments."""
156156

157157
# Check n_clusters and max_iter
158158
self._check_nonnegative_int(self.n_clusters, "n_clusters")
@@ -298,7 +298,7 @@ def _update_medoid_idxs_in_place(self, D, labels, medoid_idxs):
298298
medoid_idxs[k] = cluster_k_idxs[min_cost_idx]
299299

300300
def _compute_cost(self, D, medoid_idxs):
301-
""" Compute the cose for a given configuration of the medoids"""
301+
"""Compute the cose for a given configuration of the medoids"""
302302
return self._compute_inertia(D[:, medoid_idxs])
303303

304304
def transform(self, X):

sklearn_extra/kernel_approximation/_fastfood.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _uniform_vector(self, rng):
116116
return None
117117

118118
def _apply_approximate_gaussian_matrix(self, B, G, P, X):
119-
""" Create mapping of all x_i by applying B, G and P step-wise """
119+
"""Create mapping of all x_i by applying B, G and P step-wise"""
120120
num_examples = X.shape[0]
121121

122122
result = np.multiply(B, X.reshape((1, num_examples, 1, self._d)))
@@ -134,7 +134,7 @@ def _apply_approximate_gaussian_matrix(self, B, G, P, X):
134134
return result
135135

136136
def _scale_transformed_data(self, S, VX):
137-
""" Scale mapped data VX to match kernel(e.g. RBF-Kernel) """
137+
"""Scale mapped data VX to match kernel(e.g. RBF-Kernel)"""
138138
VX = VX.reshape(-1, self._times_to_stack_v * self._d)
139139

140140
return (

sklearn_extra/robust/robust_weighted_estimator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def fit(self, X, y=None):
418418
return self
419419

420420
def _get_loss_function(self, loss):
421-
"""Get concrete ''LossFunction'' object for str ''loss''. """
421+
"""Get concrete ''LossFunction'' object for str ''loss''."""
422422
if type(loss) == str:
423423
eff_loss = LOSS_FUNCTIONS.get(loss)
424424
if eff_loss is None:

0 commit comments

Comments
 (0)