Docs say parameter sample_weight of LinearRegression.fit must be array but number is also valid

### Describe the issue linked to the documentation

The documentation page for the `fit` method of the `LinearRegression` class mentions that the `sample_weight` parameter must be of type `array_like` or `None` ([docs](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html#sklearn.linear_model.LinearRegression.fit)). However this is not entirely true since we can also pass `float` or `int` for this parameter. Floats or ints get transformed into an array of that same value repeating n times. Code snippet here:
https://github.com/scikit-learn/scikit-learn/blob/f59c50301bc725fe3da75ac3b5e8614ff9a26f98/sklearn/utils/validation.py#L2000-L2003
This makes it that a sample weight of `float` or `int` is essentially equal to `None` since they all have the same relative weight (not sure if I'm overseeing something, but could not think of any case where a float or int for `sample_weight` could be meaningful).

### Suggest a potential alternative/fix

I see two possible fixes:
- Change the documentation to address the fact that numbers are valid values for `sample_weight` however they have no effect since there is no difference in the relative weight of the samples.
- Change the code so that an error or warning is raised if the `sample_weight` parameter is a `float` or an `int`.

COMMENT:
Raising an error in `_check_sample_weight` (which is not used everywhere so results might not show the whole picture) when passing a float makes the following tests fail:
```
sklearn/linear_model/_glm/tests/test_glm.py::test_sample_weights_validation FAILED                                                                               [  8%]
sklearn/linear_model/tests/test_base.py::test_raises_value_error_if_sample_weights_greater_than_1d[2-3] FAILED                                                   [ 16%]
sklearn/linear_model/tests/test_base.py::test_raises_value_error_if_sample_weights_greater_than_1d[3-2] FAILED                                                   [ 25%]
sklearn/linear_model/tests/test_base.py::test_linear_regression_sample_weight_consistency[42-False-None] FAILED                                                  [ 33%]
sklearn/linear_model/tests/test_base.py::test_linear_regression_sample_weight_consistency[42-False-csr_matrix] FAILED                                            [ 41%]
sklearn/linear_model/tests/test_base.py::test_linear_regression_sample_weight_consistency[42-False-csr_array] FAILED                                             [ 50%]
sklearn/linear_model/tests/test_base.py::test_linear_regression_sample_weight_consistency[42-True-None] FAILED                                                   [ 58%]
sklearn/linear_model/tests/test_base.py::test_linear_regression_sample_weight_consistency[42-True-csr_matrix] FAILED                                             [ 66%]
sklearn/linear_model/tests/test_base.py::test_linear_regression_sample_weight_consistency[42-True-csr_array] FAILED                                              [ 75%]
sklearn/linear_model/tests/test_ridge.py::test_raises_value_error_if_sample_weights_greater_than_1d FAILED                                                       [ 83%]
sklearn/utils/tests/test_validation.py::test_check_sample_weight FAILED
```
Some tests just check that passing a float works. Some check consistency, i.e. passing a float has the same effect as passing None.

Labels: Documentation, Needs Decision