From 99acd16d9582a78b11561108b63db3aacb042ccc Mon Sep 17 00:00:00 2001 From: Maxwell Aladago Date: Sun, 11 Aug 2019 09:47:12 -0400 Subject: fixes StopIteration error for empty file with skip_header > 0 --- numpy/lib/tests/test_io.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'numpy/lib/tests/test_io.py') diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 78f9f85f3..407bb56bf 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -1681,6 +1681,10 @@ M 33 21.99 test = np.genfromtxt(data) assert_equal(test, np.array([])) + # when skip_header > 0 + test = np.genfromtxt(data, skip_header=1) + assert_equal(test, np.array([])) + def test_fancy_dtype_alt(self): # Check that a nested dtype isn't MIA data = TextIO('1,2,3.0\n4,5,6.0\n') -- cgit v1.2.1