Skip to content

Commit

Permalink
TST: io/matlab: test also writing big-endian unicode strings
Browse files Browse the repository at this point in the history
  • Loading branch information
pv committed Mar 10, 2013
1 parent afad183 commit 8715dce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scipy/io/matlab/tests/test_mio.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,11 +836,13 @@ def test_write_big_endian():
# behave correctly if the user supplies a big-endian numpy array to write out
stream = BytesIO()
savemat_future(stream, {'a': np.array([[ 2., 3.],
[ 3., 4.]], dtype='>f4')})
[ 3., 4.]], dtype='>f4'),
'b': np.array([u'hello', u'world'], dtype='>U')})
rdr = MatFile5Reader_future(stream)
d = rdr.get_variables()
assert_array_equal(d['a'], np.array([[ 2., 3.],
[ 3., 4.]], dtype='f4'))
assert_array_equal(d['b'], np.array([u'hello', u'world'], dtype='U'))
stream.close()


Expand Down

0 comments on commit 8715dce

Please sign in to comment.