File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 23
23
from ..utils import check_array
24
24
from ..utils .extmath import row_norms
25
25
from ..utils .extmath import _incremental_mean_and_var
26
+ from ..utils .fixes import empty_like
26
27
from ..utils .sparsefuncs_fast import (inplace_csr_row_normalize_l1 ,
27
28
inplace_csr_row_normalize_l2 )
28
29
from ..utils .sparsefuncs import (inplace_column_scale ,
@@ -1585,8 +1586,8 @@ def transform(self, X):
1585
1586
columns .append (bias )
1586
1587
XP = sparse .hstack (columns , dtype = X .dtype ).tocsc ()
1587
1588
else :
1588
- XP = np . empty (( n_samples , self .n_output_features_ ) ,
1589
- dtype = X . dtype , order = self .order )
1589
+ XP = empty_like ( X , order = self .order ,
1590
+ shape = ( n_samples , self .n_output_features_ ) )
1590
1591
1591
1592
# What follows is a faster implementation of:
1592
1593
# for i, comb in enumerate(combinations):
You can’t perform that action at this time.
0 commit comments