MCPcopy Index your code
hub / github.com/numpy/numpy / test_1D

Method test_1D

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

Source from the content-addressed store, hash-verified

770 assert_array_equal(x, a)
771
772 def test_1D(self):
773 c = TextIO()
774 c.write('1\n2\n3\n4\n')
775 c.seek(0)
776 x = np.loadtxt(c, dtype=int)
777 a = np.array([1, 2, 3, 4], int)
778 assert_array_equal(x, a)
779
780 c = TextIO()
781 c.write('1,2,3,4\n')
782 c.seek(0)
783 x = np.loadtxt(c, dtype=int, delimiter=',')
784 a = np.array([1, 2, 3, 4], int)
785 assert_array_equal(x, a)
786
787 def test_missing(self):
788 c = TextIO()

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