Open
Description
Currently docstrings description for scalar ranges uses the interval syntax:
scikit-learn/sklearn/linear_model/_glm/glm.py
Line 462 in 42cc05c
While the error message uses a different notation:
from sklearn.utils.validation import check_scalar
check_scalar(-1.0, "alpha", target_type=float, min_val=0.0)
# ValueError: alpha == -1.0, must be >= 0.0.
Should we update this notation to be consistent with the docstring? i.e:
# ValueError: alpha == -1.0, must be in the range [0.0, inf)
(I am assuming that inf
is always an open boundary)
CC @glemaitre