MCPcopy Create free account
hub / github.com/numpy/numpy / test_skiprows

Method test_skiprows

numpy/lib/tests/test_io.py:834–849  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

832 comments='/*')
833
834 def test_skiprows(self):
835 c = TextIO()
836 c.write('comment\n1,2,3,5\n')
837 c.seek(0)
838 x = np.loadtxt(c, dtype=int, delimiter=',',
839 skiprows=1)
840 a = np.array([1, 2, 3, 5], int)
841 assert_array_equal(x, a)
842
843 c = TextIO()
844 c.write('# comment\n1,2,3,5\n')
845 c.seek(0)
846 x = np.loadtxt(c, dtype=int, delimiter=',',
847 skiprows=1)
848 a = np.array([1, 2, 3, 5], int)
849 assert_array_equal(x, a)
850
851 def test_usecols(self):
852 a = np.array([[1, 2], [3, 4]], float)

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
assert_array_equalFunction · 0.90
TextIOClass · 0.85
seekMethod · 0.80

Tested by

no test coverage detected