diff --git a/imblearn/base.py b/imblearn/base.py index 0ddc9386a..ab554aa83 100644 --- a/imblearn/base.py +++ b/imblearn/base.py @@ -4,8 +4,6 @@ # Christos Aridas # License: MIT -from __future__ import division - import warnings from abc import ABCMeta, abstractmethod diff --git a/imblearn/combine/_smote_enn.py b/imblearn/combine/_smote_enn.py index 2e153071b..9651b2d4a 100644 --- a/imblearn/combine/_smote_enn.py +++ b/imblearn/combine/_smote_enn.py @@ -4,8 +4,6 @@ # Christos Aridas # License: MIT -from __future__ import division - from sklearn.base import clone from sklearn.utils import check_X_y diff --git a/imblearn/combine/_smote_tomek.py b/imblearn/combine/_smote_tomek.py index 9bfb39fb3..ffbbb8f59 100644 --- a/imblearn/combine/_smote_tomek.py +++ b/imblearn/combine/_smote_tomek.py @@ -5,8 +5,6 @@ # Christos Aridas # License: MIT -from __future__ import division - from sklearn.base import clone from sklearn.utils import check_X_y diff --git a/imblearn/metrics/_classification.py b/imblearn/metrics/_classification.py index 042525807..9edbc9611 100644 --- a/imblearn/metrics/_classification.py +++ b/imblearn/metrics/_classification.py @@ -12,8 +12,6 @@ # Dariusz Brzezinski # License: MIT -from __future__ import division - import warnings import functools diff --git a/imblearn/metrics/tests/test_classification.py b/imblearn/metrics/tests/test_classification.py index 860724536..49e62da85 100644 --- a/imblearn/metrics/tests/test_classification.py +++ b/imblearn/metrics/tests/test_classification.py @@ -4,8 +4,6 @@ # Christos Aridas # License: MIT -from __future__ import division - from functools import partial import numpy as np diff --git a/imblearn/over_sampling/_adasyn.py b/imblearn/over_sampling/_adasyn.py index 516479f3a..c3657c6c5 100644 --- a/imblearn/over_sampling/_adasyn.py +++ b/imblearn/over_sampling/_adasyn.py @@ -4,8 +4,6 @@ # Christos Aridas # License: MIT -from __future__ import division - import numpy as np from scipy import sparse diff --git a/imblearn/over_sampling/_random_over_sampler.py b/imblearn/over_sampling/_random_over_sampler.py index 2f1fbfdc7..6d067defb 100644 --- a/imblearn/over_sampling/_random_over_sampler.py +++ b/imblearn/over_sampling/_random_over_sampler.py @@ -3,7 +3,6 @@ # Authors: Guillaume Lemaitre # Christos Aridas # License: MIT -from __future__ import division from collections import Counter diff --git a/imblearn/over_sampling/_smote.py b/imblearn/over_sampling/_smote.py index a7109ab48..905629de4 100644 --- a/imblearn/over_sampling/_smote.py +++ b/imblearn/over_sampling/_smote.py @@ -6,8 +6,6 @@ # Dzianis Dudnik # License: MIT -from __future__ import division - import math import types import warnings @@ -1218,7 +1216,6 @@ def _validate_estimator(self): if self.kmeans_estimator_.n_clusters != 1 else -np.inf ) - def _find_cluster_sparsity(self, X): """Compute the cluster sparsity.""" euclidean_distances = pairwise_distances(X, metric="euclidean", diff --git a/imblearn/pipeline.py b/imblearn/pipeline.py index f84b83375..7fdf56fcf 100644 --- a/imblearn/pipeline.py +++ b/imblearn/pipeline.py @@ -13,8 +13,6 @@ # Guillaume Lemaitre # License: BSD -from __future__ import division - from collections import defaultdict from itertools import islice diff --git a/imblearn/tensorflow/_generator.py b/imblearn/tensorflow/_generator.py index b0ebb4cd3..f2e80794b 100644 --- a/imblearn/tensorflow/_generator.py +++ b/imblearn/tensorflow/_generator.py @@ -1,7 +1,5 @@ """Implement generators for ``tensorflow`` which will balance the data.""" -from __future__ import division - from scipy.sparse import issparse from sklearn.base import clone diff --git a/imblearn/tensorflow/tests/test_generator.py b/imblearn/tensorflow/tests/test_generator.py index 373f18c76..93de15cfc 100644 --- a/imblearn/tensorflow/tests/test_generator.py +++ b/imblearn/tensorflow/tests/test_generator.py @@ -1,5 +1,3 @@ -from __future__ import division - import pytest import numpy as np from scipy import sparse diff --git a/imblearn/under_sampling/_prototype_generation/_cluster_centroids.py b/imblearn/under_sampling/_prototype_generation/_cluster_centroids.py index 1588afc07..fe21eaf98 100644 --- a/imblearn/under_sampling/_prototype_generation/_cluster_centroids.py +++ b/imblearn/under_sampling/_prototype_generation/_cluster_centroids.py @@ -6,8 +6,6 @@ # Christos Aridas # License: MIT -from __future__ import division - import numpy as np from scipy import sparse diff --git a/imblearn/under_sampling/_prototype_selection/_condensed_nearest_neighbour.py b/imblearn/under_sampling/_prototype_selection/_condensed_nearest_neighbour.py index dae8c862e..d5e4b4642 100644 --- a/imblearn/under_sampling/_prototype_selection/_condensed_nearest_neighbour.py +++ b/imblearn/under_sampling/_prototype_selection/_condensed_nearest_neighbour.py @@ -5,8 +5,6 @@ # Christos Aridas # License: MIT -from __future__ import division - from collections import Counter import numpy as np diff --git a/imblearn/under_sampling/_prototype_selection/_edited_nearest_neighbours.py b/imblearn/under_sampling/_prototype_selection/_edited_nearest_neighbours.py index 48cd1f94d..032567af1 100644 --- a/imblearn/under_sampling/_prototype_selection/_edited_nearest_neighbours.py +++ b/imblearn/under_sampling/_prototype_selection/_edited_nearest_neighbours.py @@ -6,8 +6,6 @@ # Christos Aridas # License: MIT -from __future__ import division - from collections import Counter import numpy as np diff --git a/imblearn/under_sampling/_prototype_selection/_instance_hardness_threshold.py b/imblearn/under_sampling/_prototype_selection/_instance_hardness_threshold.py index ffa6263ae..5991a2785 100644 --- a/imblearn/under_sampling/_prototype_selection/_instance_hardness_threshold.py +++ b/imblearn/under_sampling/_prototype_selection/_instance_hardness_threshold.py @@ -6,8 +6,6 @@ # Christos Aridas # License: MIT -from __future__ import division - from collections import Counter import numpy as np diff --git a/imblearn/under_sampling/_prototype_selection/_nearmiss.py b/imblearn/under_sampling/_prototype_selection/_nearmiss.py index 1786352ad..86e018769 100644 --- a/imblearn/under_sampling/_prototype_selection/_nearmiss.py +++ b/imblearn/under_sampling/_prototype_selection/_nearmiss.py @@ -4,8 +4,6 @@ # Christos Aridas # License: MIT -from __future__ import division - import warnings from collections import Counter diff --git a/imblearn/under_sampling/_prototype_selection/_neighbourhood_cleaning_rule.py b/imblearn/under_sampling/_prototype_selection/_neighbourhood_cleaning_rule.py index 28731c5dd..b2a07835a 100644 --- a/imblearn/under_sampling/_prototype_selection/_neighbourhood_cleaning_rule.py +++ b/imblearn/under_sampling/_prototype_selection/_neighbourhood_cleaning_rule.py @@ -4,8 +4,6 @@ # Christos Aridas # License: MIT -from __future__ import division - from collections import Counter import numpy as np diff --git a/imblearn/under_sampling/_prototype_selection/_one_sided_selection.py b/imblearn/under_sampling/_prototype_selection/_one_sided_selection.py index fede527d1..cea9ecd0d 100644 --- a/imblearn/under_sampling/_prototype_selection/_one_sided_selection.py +++ b/imblearn/under_sampling/_prototype_selection/_one_sided_selection.py @@ -4,8 +4,6 @@ # Christos Aridas # License: MIT -from __future__ import division - from collections import Counter import numpy as np diff --git a/imblearn/under_sampling/_prototype_selection/_random_under_sampler.py b/imblearn/under_sampling/_prototype_selection/_random_under_sampler.py index 0394c8625..afa9efb0f 100644 --- a/imblearn/under_sampling/_prototype_selection/_random_under_sampler.py +++ b/imblearn/under_sampling/_prototype_selection/_random_under_sampler.py @@ -4,8 +4,6 @@ # Christos Aridas # License: MIT -from __future__ import division - import numpy as np from sklearn.utils import check_array diff --git a/imblearn/under_sampling/_prototype_selection/_tomek_links.py b/imblearn/under_sampling/_prototype_selection/_tomek_links.py index 50d43217b..280377f55 100644 --- a/imblearn/under_sampling/_prototype_selection/_tomek_links.py +++ b/imblearn/under_sampling/_prototype_selection/_tomek_links.py @@ -5,8 +5,6 @@ # Christos Aridas # License: MIT -from __future__ import division - import numpy as np from sklearn.neighbors import NearestNeighbors from sklearn.utils import safe_indexing diff --git a/imblearn/utils/_validation.py b/imblearn/utils/_validation.py index abad3d554..1bdb3c9c5 100644 --- a/imblearn/utils/_validation.py +++ b/imblearn/utils/_validation.py @@ -2,7 +2,6 @@ # Authors: Guillaume Lemaitre # License: MIT -from __future__ import division import warnings from collections import OrderedDict diff --git a/imblearn/utils/estimator_checks.py b/imblearn/utils/estimator_checks.py index c967a005c..b1ae04762 100644 --- a/imblearn/utils/estimator_checks.py +++ b/imblearn/utils/estimator_checks.py @@ -4,8 +4,6 @@ # Authors: Guillaume Lemaitre # License: MIT -from __future__ import division - import sys import traceback