code: def cdf(arr, **kwargs):
      
      counts, bin_edges = histogram(arr, **kwargs)
      cdf = cumsum(counts)
      return cdf
docs: ARGS
          arr                array to calculate cumulative distribution function
  
      **kwargs
          Passed directly to numpy.histogram. Typical options include:
          bins = <num_bins>
          normed = True|False
  
      DESC
          Determines the cumulative distribution function.