def test_nofile(self):
# this should probably be supported as a file
# but for now test for proper errors
b = io.BytesIO()
assert_raises(IOError, np.fromfile, b, np.uint8, 80)
d = np.ones(7);
assert_raises(IOError, lambda x: x.tofile(b), d)
评论列表
文章目录