def periodogram(X):
    '\n    Returns the periodogram for the natural frequency of X\n\n    Parameters\n    ----------\n    X : array-like\n        Array for which the periodogram is desired.\n\n    Returns\n    -------\n    pgram : array\n        1./len(X) * np.abs(np.fft.fft(X))**2\n\n\n    References\n    ----------\n    Brockwell and Davis.\n    '
    X = np.asarray(X)
    pergr = ((1.0 / len(X)) * (np.abs(np.fft.fft(X)) ** 2))
    pergr[0] = 0.0
    return pergr
Returns the periodogram for the natural frequency of X

Parameters
----------
X : array-like
    Array for which the periodogram is desired.

Returns
-------
pgram : array
    1./len(X) * np.abs(np.fft.fft(X))**2


References
----------
Brockwell and Davis.
def periodogram(X):
    '\n    Returns the periodogram for the natural frequency of X\n\n    Parameters\n    ----------\n    X : array-like\n        Array for which the periodogram is desired.\n\n    Returns\n    -------\n    pgram : array\n        1./len(X) * np.abs(np.fft.fft(X))**2\n\n\n    References\n    ----------\n    Brockwell and Davis.\n    '
    X = np.asarray(X)
    pergr = ((1.0 / len(X)) * (np.abs(np.fft.fft(X)) ** 2))
    pergr[0] = 0.0
    return pergr