Skip to content

Commit b395184

Browse files
committed
TST: Add a test for vectorized call
1 parent 3ab1ac0 commit b395184

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

quantecon/tests/test_ecdf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ def test_ascending(self):
3030
F_1 = self.ecdf(x)
3131
F_2 = self.ecdf(1.1 * x)
3232
self.assertGreaterEqual(F_2, F_1)
33+
34+
def test_vectorized(self):
35+
"ecdf: testing vectorized __call__ method"
36+
t = np.linspace(-1, 1, 100)
37+
self.assertEqual(t.shape, self.ecdf(t).shape)
38+
t = np.linspace(-1, 1, 100).reshape(2, 2, 25)
39+
self.assertEqual(t.shape, self.ecdf(t).shape)

0 commit comments

Comments
 (0)