@cache(level=<NUM_LIT:20>)<EOL>def to_mono(y):
<EOL>util.valid_audio(y, mono=False)<EOL>if y.ndim > <NUM_LIT:1>:<EOL><INDENT>y = np.mean(y, axis=<NUM_LIT:0>)<EOL><DEDENT>return y<EOL>
Force an audio signal down to mono.

    Parameters
    ----------
    y : np.ndarray [shape=(2,n) or shape=(n,)]
        audio time series, either stereo or mono

    Returns
    -------
    y_mono : np.ndarray [shape=(n,)]
        `y` as a monophonic time-series

    Notes
    -----
    This function caches at level 20.

    Examples
    --------
    >>> y, sr = librosa.load(librosa.util.example_audio_file(), mono=False)
    >>> y.shape
    (2, 1355168)
    >>> y_mono = librosa.to_mono(y)
    >>> y_mono.shape
    (1355168,)