Skip to content

Instantly share code, notes, and snippets.

@gdakram
Created May 22, 2019 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdakram/c67cdfed761a716e808094eb342605d5 to your computer and use it in GitHub Desktop.
Save gdakram/c67cdfed761a716e808094eb342605d5 to your computer and use it in GitHub Desktop.
import numpy as np
def ecdf(data):
n = len(data)
x = np.sort(data)
y = np.true_divide(np.arange(1, n+1), n)
return x, y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment