function hamming(M) {
    return generalized_cosine_window(M, 0.54);
}
Generates a Hamming window of length M.
See https://numpy.org/doc/stable/reference/generated/numpy.hamming.html for more information.

@param {number} M The length of the Hamming window to generate.
@returns {Float64Array} The generated Hamming window.