@docstring.dedent_interpd
def specgram(x, NFFT=None, Fs=None, detrend=None, window=None, noverlap=None, pad_to=None, sides=None, scale_by_freq=None, mode=None):
 if (noverlap is None):
  noverlap = 128
 if (NFFT is None):
  NFFT = 256
 if (len(x) <= NFFT):
  warnings.warn((u'Only one segment is calculated since parameter NFFT ' + (u'(=%d) >= signal length (=%d).' % (NFFT, len(x)))))
 (spec, freqs, t) = _spectral_helper(x=x, y=None, NFFT=NFFT, Fs=Fs, detrend_func=detrend, window=window, noverlap=noverlap, pad_to=pad_to, sides=sides, scale_by_freq=scale_by_freq, mode=mode)
 if (mode != u'complex'):
  spec = spec.real
 return (spec, freqs, t)

@ docstring . dedent_interpd def specgram ( x , NFFT = None , Fs = None , detrend = None , window = None , noverlap = None , pad_to = None , sides = None , scale_by_freq = None , mode = None ) : if ( noverlap is None ) : noverlap = 128 if ( NFFT is None ) : NFFT = 256 if ( len ( x ) <= NFFT ) : warnings . warn ( ( u'Only one segment is calculated since parameter NFFT ' + ( u'(=%d) >= signal length (=%d).' % ( NFFT , len ( x ) ) ) ) ) ( spec , freqs , t ) = _spectral_helper ( x = x , y = None , NFFT = NFFT , Fs = Fs , detrend_func = detrend , window = window , noverlap = noverlap , pad_to = pad_to , sides = sides , scale_by_freq = scale_by_freq , mode = mode ) if ( mode != u'complex' ) : spec = spec . real return ( spec , freqs , t )
compute a spectrogram of data in *x* .