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

Method test_1D

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

Source from the content-addressed store, hash-verified

753 assert_array_equal(x, a)
754
755 def test_1D(self):
756 c = TextIO()
757 c.write('1\n2\n3\n4\n')
758 c.seek(0)
759 x = np.loadtxt(c, dtype=int)
760 a = np.array([1, 2, 3, 4], int)
761 assert_array_equal(x, a)
762
763 c = TextIO()
764 c.write('1,2,3,4\n')
765 c.seek(0)
766 x = np.loadtxt(c, dtype=int, delimiter=',')
767 a = np.array([1, 2, 3, 4], int)
768 assert_array_equal(x, a)
769
770 def test_missing(self):
771 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