Skip to content

Commit 4d9bf8a

Browse files
committed
TST: Added regression test empty percentile, in ref to numpy#6530 and numpy#6553
1 parent 773437c commit 4d9bf8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numpy/core/tests/test_regression.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,5 +2173,9 @@ def test_leak_in_structured_dtype_comparison(self):
21732173
after = sys.getrefcount(a)
21742174
assert_equal(before, after)
21752175

2176+
def test_empty_percentile(self):
2177+
# gh-6530 / gh-6553
2178+
assert_array_equal(np.percentile(np.arange(10), []), np.array([]))
2179+
21762180
if __name__ == "__main__":
21772181
run_module_suite()

0 commit comments

Comments
 (0)