partial_dependence errors when given only two grid points

### Describe the bug

In the nightly build, when given only two grid points, the partial dependence function incorrectly thinks it is dealing with a binary output and tries to drop one of them in an attempt to fetch only the positive class. The offending line is here: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/inspection/_partial_dependence.py#L315 This entire check is unneeded because our call to `_get_response_values` above now selects for the positive class in binary models. 

I intend to correct this as part of https://github.com/scikit-learn/scikit-learn/pull/26202, but can split that fix off as well. 

### Steps/Code to Reproduce

```py
from sklearn.dummy import DummyClassifier
from sklearn.inspection import partial_dependence
import numpy as np
import pandas as pd

model = DummyClassifier()
X = pd.DataFrame(
    {
        "a": np.random.randint(0, 10, size=100),
        "b": np.random.randint(0, 10, size=100),
    }
)
y = pd.Series(np.random.randint(0, 2, size=100))
model.fit(X, y)
part_dep = partial_dependence(
    model,
    X,
    features=["a"],
    grid_resolution=2,
    kind="average",
)
```

### Expected Results

No error is thrown and a partial dependence output is computed with two values.

### Actual Results

```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/XXXXX/miniconda3/envs/sklearn-test/lib/python3.10/site-packages/sklearn/utils/_param_validation.py", line 216, in wrapper
    return func(*args, **kwargs)
  File "/Users/XXXXX/miniconda3/envs/sklearn-test/lib/python3.10/site-packages/sklearn/inspection/_partial_dependence.py", line 682, in partial_dependence
    averaged_predictions = averaged_predictions.reshape(
ValueError: cannot reshape array of size 1 into shape (2)
```

### Versions

```shell
System:
    python: 3.10.15 | packaged by conda-forge | (main, Oct 16 2024, 01:24:20) [Clang 17.0.6 ]
executable: /Users/XXXX/miniconda3/envs/sklearn-test/bin/python
   machine: macOS-14.7.1-arm64-arm-64bit

Python dependencies:
      sklearn: 1.7.dev0
          pip: 24.3.1
   setuptools: 75.3.0
        numpy: 2.1.3
        scipy: 1.14.1
       Cython: None
       pandas: 2.2.3
   matplotlib: None
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 10
         prefix: libopenblas
       filepath: /Users/XXXX/miniconda3/envs/sklearn-test/lib/libopenblas.0.dylib
        version: 0.3.28
threading_layer: openmp
   architecture: VORTEX

       user_api: openmp
   internal_api: openmp
    num_threads: 10
         prefix: libomp
       filepath: /Users/XXXX/miniconda3/envs/sklearn-test/lib/libomp.dylib
        version: None

       user_api: openmp
   internal_api: openmp
    num_threads: 10
         prefix: libomp
       filepath: /Users/XXXX/miniconda3/envs/sklearn-test/lib/python3.10/site-packages/sklearn/.dylibs/libomp.dylib
        version: None
```

COMMENT:
@lesteve - PR #30287 with a fix is ready for review now.

Labels: Bug