Ravel column or 1d numpy array, else raises an error.
Input data.
Data type for y.
Added in version 1.2.
To control display of warnings.
device object. See the Array API User Guide for more details.
Added in version 1.6.
Output data.
If y is not a 1D array or a 2D array with a single row or column.
>>> from sklearn.utils.validation import column_or_1d >>> column_or_1d([1, 1]) array([1, 1])
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.utils.validation.column_or_1d.html