r to raise an error when the input arrays are not 2-dimensional. Setting
    this to `False` is necessary when using a custom metric with certain
    non-numerical inputs (e.g. a list of strings).

    .. versionadded:: 1.5

copy : bool, default=False
    Whether a forced copy will be triggered. If copy=False, a copy might
    be triggered by a conversion.

    .. versionadded:: 0.22

Returns
-------
safe_X : {array-like, sparse matrix} of shape (n_samples_X, n_features)
    An array equal to X, guaranteed to be a numpy array.

safe_Y : {array-like, sparse matrix} of shape (n_samples_Y, n_features)
    An array equal to Y if Y was not None, guaranteed to be a numpy array.
    If Y was None, safe_Y will be a pointer to X.
©