code: def standardize(x, offset=None, scale=None):
      
      if offset == None:
          offset = np.array(x).mean()
      else:
          try:
              offset = float(offset)
          except:
              raise ValueError('The argument offset is not None or float') 
      if scale == None:
          scale = np.array(x).std()
      else:
          try:
              scale = float(scale)
          except:
              raise ValueError('The argument scale is not None or float')    
      try:
          x = np.array(x, dtype="float64")
      except:
          raise ValueError('The argument x is not numpy array or similar.')         
      return (x - offset) / scale
docs: This is function for standarization of input series.
  
      **Args:**
  
      * `x` : series (1 dimensional array)
  
      **Kwargs:**
  
      * `offset` : offset to remove (float). If not given, \
          the mean value of `x` is used.
  
      * `scale` : scale (float). If not given, \
          the standard deviation of `x` is used.
          
      **Returns:**
  
      * `xs` : standardized series