=False,
    Whether or not the weights are expected to be non-negative.

    .. versionadded:: 1.0

dtype : dtype, default=None
    dtype of the validated `sample_weight`.
    If None, and the input `sample_weight` is an array, the dtype of the
    input is preserved; otherwise an array with the default numpy dtype
    is be allocated.  If `dtype` is not one of `float32`, `float64`,
    `None`, the output will be of dtype `float64`.

copy : bool, default=False
    If True, a copy of sample_weight will be created.

Returns
-------
sample_weight : ndarray of shape (n_samples,)
    Validated sample weight. It is guaranteed to be "C" contiguous.
©