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

Method test_array

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

Source from the content-addressed store, hash-verified

756 assert_array_equal(y, b)
757
758 def test_array(self):
759 c = TextIO()
760 c.write('1 2\n3 4')
761
762 c.seek(0)
763 x = np.loadtxt(c, dtype=int)
764 a = np.array([[1, 2], [3, 4]], int)
765 assert_array_equal(x, a)
766
767 c.seek(0)
768 x = np.loadtxt(c, dtype=float)
769 a = np.array([[1, 2], [3, 4]], float)
770 assert_array_equal(x, a)
771
772 def test_1D(self):
773 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