()
| 281 | |
| 282 | |
| 283 | def test_unicode_with_converter(): |
| 284 | txt = StringIO("cat,dog\nαβγ,δεζ\nabc,def\n") |
| 285 | conv = {0: lambda s: s.upper()} |
| 286 | res = np.loadtxt( |
| 287 | txt, |
| 288 | dtype=np.dtype("U12"), |
| 289 | converters=conv, |
| 290 | delimiter=",", |
| 291 | encoding=None |
| 292 | ) |
| 293 | expected = np.array([['CAT', 'dog'], ['ΑΒΓ', 'δεζ'], ['ABC', 'def']]) |
| 294 | assert_equal(res, expected) |
| 295 | |
| 296 | |
| 297 | def test_converter_with_structured_dtype(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…