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

Function test_unicode_whitespace_stripping_complex

numpy/lib/tests/test_loadtxt.py:728–734  ·  view source on GitHub ↗
(dtype)

Source from the content-addressed store, hash-verified

726
727@pytest.mark.parametrize("dtype", "FD")
728def test_unicode_whitespace_stripping_complex(dtype):
729 # Complex has a few extra cases since it has two components and
730 # parentheses
731 line = " 1 , 2+3j , ( 4+5j ), ( 6+-7j ) , 8j , ( 9j ) \n"
732 data = [line, line.replace(" ", "\u202F")]
733 res = np.loadtxt(data, dtype=dtype, delimiter=',')
734 assert_array_equal(res, np.array([[1, 2+3j, 4+5j, 6-7j, 8j, 9j]] * 2))
735
736
737@pytest.mark.skipif(IS_PYPY and sys.implementation.version <= (7, 3, 8),

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected