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

Method test_missing

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

Source from the content-addressed store, hash-verified

768 assert_array_equal(x, a)
769
770 def test_missing(self):
771 c = TextIO()
772 c.write('1,2,3,,5\n')
773 c.seek(0)
774 x = np.loadtxt(c, dtype=int, delimiter=',',
775 converters={3: lambda s: int(s or - 999)})
776 a = np.array([1, 2, 3, -999, 5], int)
777 assert_array_equal(x, a)
778
779 def test_converters_with_usecols(self):
780 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