class_docstr: fft tools for arma processes
  
  This class contains several methods that are providing the same or similar
  returns to try out and test different implementations.
  
  Notes
  -----
  TODO:
  check whether we do not want to fix maxlags, and create new instance if
  maxlag changes. usage for different lengths of timeseries ?
  or fix frequency and length for fft
  
  check default frequencies w, terminology norw  n_or_w
  
  some ffts are currently done without padding with zeros
  
  returns for spectral density methods needs checking, is it always the power
  spectrum hw*hw.conj()
  
  normalization of the power spectrum, spectral density: not checked yet, for
  example no variance of underlying process is used
class_docstr_tok: ["fft","tools","for","arma","processes","This","class","contains","several","methods","that","are","providing","the","same","or","similar","returns","to","try","out","and","test","different","implementations",".","Notes","--","--","-","TODO",":","check","whether","we","do","not","want","to","fix","maxlags",",","and","create","new","instance","if","maxlag","changes",".","usage","for","different","lengths","of","timeseries","?","or","fix","frequency","and","length","for","fft","check","default","frequencies","w",",","terminology","norw","n_or_w","some","ffts","are","currently","done","without","padding","with","zeros","returns","for","spectral","density","methods","needs","checking",",","is","it","always","the","power","spectrum","hw","*","hw.conj","(",")","normalization","of","the","power","spectrum",",","spectral","density",":","not","checked","yet",",","for","example","no","variance","of","underlying","process","is","used"]
docstr: pad 1d array with zeros at end to have length maxlag
  function that is a method, no self used
  
  Parameters
  ----------
  arr : array_like, 1d
      array that will be padded with zeros
  maxlag : int
      length of array after padding
  atend : bool
      If True (default), then the zeros are added to the end, otherwise
      to the front of the array
  
  Returns
  -------
  arrp : ndarray
      zero-padded array
  
  Notes
  -----
  This is mainly written to extend coefficient arrays for the lag-polynomials.
  It returns a copy.
docstr_tok: ["pad","1d","array","with","zeros","at","end","to","have","length","maxlag","function","that","is","a","method",",","no","self","used","Parameters","--","--","--","--","--","arr",":","array_like",",","1d","array","that","will","be","padded","with","zeros","maxlag",":","int","length","of","array","after","padding","atend",":","bool","If","True","(","default",")",",","then","the","zeros","are","added","to","the","end",",","otherwise","to","the","front","of","the","array","Returns","--","--","--","-","arrp",":","ndarray","zero-padded","array","Notes","--","--","-","This","is","mainly","written","to","extend","coefficient","arrays","for","the","lag-polynomials",".","It","returns","a","copy","."]
code: def padarr(self, arr, maxlag, atend=True):
      """pad 1d array with zeros at end to have length maxlag
      function that is a method, no self used
  
      Parameters
      ----------
      arr : array_like, 1d
          array that will be padded with zeros
      maxlag : int
          length of array after padding
      atend : bool
          If True (default), then the zeros are added to the end, otherwise
          to the front of the array
  
      Returns
      -------
      arrp : ndarray
          zero-padded array
  
      Notes
      -----
      This is mainly written to extend coefficient arrays for the lag-polynomials.
      It returns a copy.
  
      """
      if atend:
          return np.r_[arr, np.zeros(maxlag - len(arr))]
      else:
          return np.r_[np.zeros(maxlag - len(arr)), arr]
  
imports: import numpy
  import numpy.fft
  from scipy import signal
  from statsmodels.tsa.arima_process import ArmaProcess
label_desc: Use image node_id 2 for calling the ArmaFft obj's underlying member method code with example usage: obj.padarr(arr, maxlag, atend) and returns: np, np