@@ -726,17 +726,17 @@ def check_sample_weights_pandas_series(name, estimator_orig):
726
726
@ignore_warnings (category = (DeprecationWarning , FutureWarning ))
727
727
def check_sample_weights_not_an_array (name , estimator_orig ):
728
728
# check that estimators will accept a 'sample_weight' parameter of
729
- # type NotAnArray in the 'fit' function.
729
+ # type _NotAnArray in the 'fit' function.
730
730
estimator = clone (estimator_orig )
731
731
if has_fit_parameter (estimator , "sample_weight" ):
732
732
X = np .array ([[1 , 1 ], [1 , 2 ], [1 , 3 ], [1 , 4 ],
733
733
[2 , 1 ], [2 , 2 ], [2 , 3 ], [2 , 4 ],
734
734
[3 , 1 ], [3 , 2 ], [3 , 3 ], [3 , 4 ]])
735
- X = NotAnArray (pairwise_estimator_convert_X (X , estimator_orig ))
736
- y = NotAnArray ([1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 1 , 1 , 2 , 2 ])
737
- weights = NotAnArray ([1 ] * 12 )
735
+ X = _NotAnArray (pairwise_estimator_convert_X (X , estimator_orig ))
736
+ y = _NotAnArray ([1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 1 , 1 , 2 , 2 ])
737
+ weights = _NotAnArray ([1 ] * 12 )
738
738
if _safe_tags (estimator , "multioutput_only" ):
739
- y = NotAnArray (y .data .reshape (- 1 , 1 ))
739
+ y = _NotAnArray (y .data .reshape (- 1 , 1 ))
740
740
estimator .fit (X , y , sample_weight = weights )
741
741
742
742
@@ -1185,8 +1185,8 @@ def _check_transformer(name, transformer_orig, X, y):
1185
1185
if name in CROSS_DECOMPOSITION :
1186
1186
y_ = np .c_ [np .asarray (y ), np .asarray (y )]
1187
1187
y_ [::2 , 1 ] *= 2
1188
- if isinstance (X , NotAnArray ):
1189
- y_ = NotAnArray (y_ )
1188
+ if isinstance (X , _NotAnArray ):
1189
+ y_ = _NotAnArray (y_ )
1190
1190
else :
1191
1191
y_ = y
1192
1192
0 commit comments