Repository: scikit-activeml/scikit-activeml (language: python)

Issue:
BUG: SubsamplingWrapper should mask using -np.inf (see TypiClust and RegressionTreeBasedAL)
### Describe the issue:

Currently, SubsamplingWrapper sets the utilities for samples that have not been subsampled to np.nan. However, in TypiClust and RegressionTreeBasedAL, we use -np.inf instead, such that differentiation is easier.

### Reproduce the bug via a code example:

```python
Should be for any usage of SubsamplingWrapper
```


### Error message:

_No response_

### Context for the issue:

_No response_


Discussion / hints:

Fix patch:
diff --git a/skactiveml/pool/_wrapper.py b/skactiveml/pool/_wrapper.py
index 8418d4b2..44169490 100644
--- a/skactiveml/pool/_wrapper.py
+++ b/skactiveml/pool/_wrapper.py
@@ -166,6 +166,7 @@ def query(
                 max_candidates = ceil(len(candidates) * self.max_candidates)
             max_candidates = min(max_candidates, len(candidates))
             if candidates.ndim == 1:
+                candidate_indices = candidates
                 new_candidates = random_state.choice(
                     a=candidates, size=max_candidates, replace=False
                 )
@@ -193,11 +194,16 @@ def query(
         queried_indices, utilities = qs_output
 
         if candidates is None or candidates.ndim == 1:
-            new_utilities = utilities
+            new_utilities = np.full(
+                shape=(batch_size, len(X)), fill_value=np.nan
+            )
+            new_utilities[:, candidate_indices] = -np.inf
+            new_utilities[:, new_candidates] = utilities[:, new_candidates]
         else:
             new_utilities = np.full(
                 shape=(batch_size, len(candidates)), fill_value=np.nan
             )
+            new_utilities[:, candidate_indices] = -np.inf
             new_utilities[:, new_candidate_indices] = utilities
             queried_indices = new_candidate_indices[queried_indices]
 


Test patch:
diff --git a/skactiveml/pool/tests/test_wrapper.py b/skactiveml/pool/tests/test_wrapper.py
index dccfe951..d2c78d4e 100644
--- a/skactiveml/pool/tests/test_wrapper.py
+++ b/skactiveml/pool/tests/test_wrapper.py
@@ -130,7 +130,7 @@ def test_query(self):
             u = u.ravel()
             q_sub, u_sub = qs_sub.query(**query_params)
             u_sub = u_sub.ravel()
-            mask = ~np.isnan(u_sub)
+            mask = ~np.isnan(u_sub) & ~np.isneginf(u_sub)
             np.testing.assert_array_equal(u[mask], u_sub[mask])
             query_params["return_utilities"] = False
             q_sub = qs_sub.query(**query_params)
@@ -163,7 +163,10 @@ def test_query_batch_variation(self):
                 self.assertEqual(len(query_ids), batch_size)
                 self.assertEqual(len(utils), batch_size)
                 self.assertEqual(len(utils[0]), len(query_params["X"]))
-                self.assertEqual(sum(~np.isnan(utils[0])), qs.max_candidates)
+                self.assertEqual(
+                    sum(~np.isneginf(utils[0]) & ~np.isnan(utils[0])),
+                    qs.max_candidates,
+                )
 
                 query_params["batch_size"] = max_batch_size + 1
                 query_params["return_utilities"] = False