Repository: scipy/scipy
File: scipy/signal/windows/_windows.py (Python)

Code before:
    ----------
    window : str | tuple | float
        Either a string with the window name or a tuple consisting of window name and
        window parameters. If it is a float, a `~scipy.singal.kaiser` window is
        created with `window` being the shape parameter. Consult the Notes below for
        more details.
    Nx : int
        The number of samples in the window.
    fftbins : bool, optional
        If ``True`` (default), create a periodic window, ready to use with `ifftshift`
        and be multiplied by the result of an FFT (see also
        :func:`~scipy.fft.fftfreq`). If ``False``, create a symmetric window, for use
        in filter design. This parameter is ignored, if the window name in the
        `window` parameter has a suffix ``'_periodic'`` or ``'_symmetric'`` appended to
        it (e.g., ``'hann_symmetric'``).
    %(xp_device_snippet)s

    Returns
    -------
    get_window : ndarray
        Returns the created window as a one-dimensional array made of `Nx` samples.

    Raises
    ------
    ValueError
        If the provided parameters do not allow to choose a vali window function
        with valid parameters.

    Notes
    -----
    Note that by default this function returns a periodic window, whereas the wrapped
    window functions return a symmetric window by default. This is caused by the
    `fftbins` parameter having the inverse meaning of the `sym` parameter of the
    wrapped function, which are both ``True`` by default.

    .. currentmodule:: scipy.signal.windows

    The following list shows the wrapped window functions with the respective settings
    of the `window` parameter followed by a short description. Aliases for alternative
    window names are given in parenthesis.

    `barthann` / ``'barthann'``:
        Modified Bartlett-Hann window (aliases: ``'brthan', 'bth'``)
    `bartlett` / ``'bartlett'``:
        Bartlett window (aliases: ``'bart', 'brt'``)
    `blackman`/ ``'blackman'``:
        Blackman window (aliases: ``'black', 'blk'``)
    `blackman` / ``'blackmanharris'``:
        4-term Blackman-Harris window (aliases: ``'blackharr', 'bkh'``)
    `bohman` / ``'bohman'``:
        Bohman window (aliases: ``'bman', 'bmn'``)

Review comment (suggestion):
```suggestion
        If the provided parameters do not allow to choose a valid window function
```

Code after:
    ----------
    window : str | tuple | float
        Either a string with the window name or a tuple consisting of window name and
        window parameters. If it is a float, a `~scipy.singal.kaiser` window is
        created with `window` being the shape parameter. Consult the Notes below for
        more details.
    Nx : int
        The number of samples in the window.
    fftbins : bool, optional
        If ``True`` (default), create a periodic window, ready to use with `ifftshift`
        and be multiplied by the result of an FFT (see also
        :func:`~scipy.fft.fftfreq`). If ``False``, create a symmetric window, for use
        in filter design. This parameter is ignored, if the window name in the
        `window` parameter has a suffix ``'_periodic'`` or ``'_symmetric'`` appended to
        it (e.g., ``'hann_symmetric'``).
    %(xp_device_snippet)s

    Returns
    -------
    get_window : ndarray
        Returns the created window as a one-dimensional array made of `Nx` samples.

    Raises
    ------
    ValueError
        If the provided parameters do not allow to choose a valid window function
        with valid parameters.

    Notes
    -----
    Note that by default this function returns a periodic window, whereas the wrapped
    window functions return a symmetric window by default. This is caused by the
    `fftbins` parameter having the inverse meaning of the `sym` parameter of the
    wrapped function, which are both ``True`` by default.

    .. currentmodule:: scipy.signal.windows

    The following list shows the wrapped window functions with the respective settings
    of the `window` parameter followed by a short description. Aliases for alternative
    window names are given in parenthesis.

    `barthann` / ``'barthann'``:
        Modified Bartlett-Hann window (aliases: ``'brthan', 'bth'``)
    `bartlett` / ``'bartlett'``:
        Bartlett window (aliases: ``'bart', 'brt'``)
    `blackman`/ ``'blackman'``:
        Blackman window (aliases: ``'black', 'blk'``)
    `blackmanharris` / ``'blackmanharris'``:
        4-term Blackman-Harris window (aliases: ``'blackharr', 'bkh'``)
    `bohman` / ``'bohman'``:
        Bohman window (aliases: ``'bman', 'bmn'``)