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

Method test_array

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

Source from the content-addressed store, hash-verified

739 assert_array_equal(y, b)
740
741 def test_array(self):
742 c = TextIO()
743 c.write('1 2\n3 4')
744
745 c.seek(0)
746 x = np.loadtxt(c, dtype=int)
747 a = np.array([[1, 2], [3, 4]], int)
748 assert_array_equal(x, a)
749
750 c.seek(0)
751 x = np.loadtxt(c, dtype=float)
752 a = np.array([[1, 2], [3, 4]], float)
753 assert_array_equal(x, a)
754
755 def test_1D(self):
756 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