We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
frompyfunc
1 parent 22d7f58 commit 3ab1ac0Copy full SHA for 3ab1ac0
quantecon/ecdf.py
@@ -48,6 +48,7 @@ def __call__(self, x):
48
Fraction of the sample less than x
49
50
"""
51
- f = lambda a, b: a <= b
52
- vf = np.vectorize(f)
53
- return np.mean(vf(self.observations, x))
+ def f(a):
+ return np.mean(self.observations <= a)
+ vf = np.frompyfunc(f, 1, 1)
54
+ return vf(x)
0 commit comments