class_docstr: Return the Empirical CDF of an array as a step function.
  
  Parameters
  ----------
  x : array_like
      Observations
  side : {'left', 'right'}, optional
      Default is 'right'. Defines the shape of the intervals constituting the
      steps. 'right' correspond to [a, b) intervals and 'left' to (a, b].
  
  Returns
  -------
  Empirical CDF as a step function.
  
  Examples
  --------
  >>> import numpy as np
  >>> from statsmodels.distributions.empirical_distribution import ECDF
  >>>
  >>> ecdf = ECDF([3, 3, 1, 4])
  >>>
  >>> ecdf([3, 55, 0.5, 1.5])
  array([ 0.75,  1.  ,  0.  ,  0.25])
class_docstr_tok: ["Return","the","Empirical","CDF","of","an","array","as","a","step","function",".","Parameters","--","--","--","--","--","x",":","array_like","Observations","side",":","{","'left","'",",","'right","'","}",",","optional","Default","is","'right","'",".","Defines","the","shape","of","the","intervals","constituting","the","steps",".","'right","'","correspond","to","[","a",",","b",")","intervals","and","'left","'","to","(","a",",","b","]",".","Returns","--","--","--","-","Empirical","CDF","as","a","step","function",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","statsmodels.distributions.empirical_distribution","import","ECDF",">",">",">",">",">",">","ecdf","=","ECDF","(","[","3",",","3",",","1",",","4","]",")",">",">",">",">",">",">","ecdf","(","[","3",",","55",",","0.5",",","1.5","]",")","array","(","[","0.75",",","1.",",","0.",",","0.25","]",")"]
code: def __init__(self, x, side="right"):
      x = np.array(x, copy=True)
      x.sort()
      nobs = len(x)
      y = np.linspace(1.0 / nobs, 1, nobs)
      super().__init__(x, y, side=side, sorted=True)
  
file_path: statsmodels/statsmodels/distributions/empirical_distribution.py
imports: import numpy
  from scipy.interpolate import interp1d
label_desc: Use image node_id 1 to create a new ECDF object from inherited base classes: StepFunction with example: obj = ECDF(x, side)