ValueError: X has 6 features, but MaxAbsScaler is expecting 1 features as input.
This is due to recent changes sklearn.preprocessing MaxAbsScaler:
13) ERROR: test_classify (tests.test_image_classifier.Test_kNN_SAM_Classifier)
----------------------------------------------------------------------
Traceback (most recent call last):
tests/test_image_classifier.py line 216 in test_classify
cmap_sp = SC.classify(test_gA, in_nodataVal=-9999, cmap_nodataVal=-9999, tiledims=(400, 200))
specclassify/_baseclasses.py line 113 in classify
tiles_results = [self._predict_tilewise(bounds) for bounds in tqdm(bounds_alltiles)]
specclassify/_baseclasses.py line 113 in <listcomp>
tiles_results = [self._predict_tilewise(bounds) for bounds in tqdm(bounds_alltiles)]
specclassify/_baseclasses.py line 75 in _predict_tilewise
cmap, dists = self._predict(tileimdata, endmembers)
specclassify/classifiers/sam.py line 104 in _predict
angles = self.calc_sam(imdata, endmembers)
specclassify/classifiers/sam.py line 59 in calc_sam
train_spectra_norm, tileimdata_norm = normalize_endmembers_image(endmembers, image)
specclassify/misc.py line 43 in normalize_endmembers_image
endmembers_norm = max_abs_scaler.transform(em)
/root/miniconda3/envs/ci_env/lib/python3.9/site-packages/sklearn/preprocessing/_data.py line 1101 in transform
X = self._validate_data(X, accept_sparse=('csr', 'csc'),
/root/miniconda3/envs/ci_env/lib/python3.9/site-packages/sklearn/base.py line 437 in _validate_data
self._check_n_features(X, reset=reset)
/root/miniconda3/envs/ci_env/lib/python3.9/site-packages/sklearn/base.py line 365 in _check_n_features
raise ValueError(
ValueError: X has 6 features, but MaxAbsScaler is expecting 1 features as input.