MCPcopy
hub / github.com/numpy/numpy / test_missing

Method test_missing

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

Source from the content-addressed store, hash-verified

785 assert_array_equal(x, a)
786
787 def test_missing(self):
788 c = TextIO()
789 c.write('1,2,3,,5\n')
790 c.seek(0)
791 x = np.loadtxt(c, dtype=int, delimiter=',',
792 converters={3: lambda s: int(s or - 999)})
793 a = np.array([1, 2, 3, -999, 5], int)
794 assert_array_equal(x, a)
795
796 def test_converters_with_usecols(self):
797 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