8000 discriminant_analysis.py float_preserve · scikit-learn/scikit-learn@6bf9e85 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6bf9e85

Browse files
Maria AndriopoulouMaria Andriopoulou
Maria Andriopoulou
authored and
Maria Andriopoulou
committed
discriminant_analysis.py float_preserve
1 parent 4f209ed commit 6bf9e85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn/discriminant_analysis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from .covariance import ledoit_wolf, empirical_covariance, shrunk_covariance
2323
from .utils.multiclass import unique_labels
2424
from .utils import check_array, check_X_y
25-
from .utils.validation import check_is_fitted
25+
from .utils.validation import check_is_fitted, FLOAT_DTYPES
2626
from .utils.multiclass import check_classification_targets
2727
from .preprocessing import StandardScaler
2828

@@ -484,7 +484,7 @@ def transform(self, X):
484484
"solver (use 'svd' or 'eigen').")
485485
check_is_fitted(self, ['xbar_', 'scalings_'], all_or_any=any)
486486

487-
X = check_array(X)
487+
X = check_array(X, dtype=FLOAT_DTYPES)
488488
if self.solver == 'svd':
489489
X_new = np.dot(X - self.xbar_, self.scalings_)
490490
elif self.solver == 'eigen':
@@ -698,7 +698,7 @@ def fit(self, X, y):
698698
def _decision_function(self, X):
699699
check_is_fitted(self, 'classes_')
700700

701-
X = check_array(X)
701+
X = check_array(X, dtype=FLOAT_DTYPES)
702702
norm2 = []
703703
for i in range(len(self.classes_)):
704704
R = self.rotations_[i]

0 commit comments

Comments
 (0)
0