(self)
| 547 | assert_array_equal(a, b) |
| 548 | |
| 549 | def test_unicode(self): |
| 550 | utf8 = b'\xcf\x96'.decode('UTF-8') |
| 551 | a = np.array([utf8], dtype=np.str_) |
| 552 | with tempdir() as tmpdir: |
| 553 | # set encoding as on windows it may not be unicode even on py3 |
| 554 | np.savetxt(os.path.join(tmpdir, 'test.csv'), a, fmt=['%s'], |
| 555 | encoding='UTF-8') |
| 556 | |
| 557 | def test_unicode_roundtrip(self): |
| 558 | utf8 = b'\xcf\x96'.decode('UTF-8') |