We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5314521 commit d4b1059Copy full SHA for d4b1059
1 file changed
test/test_util.py
@@ -326,6 +326,17 @@ def test_write_array_to_file_d(self) -> None:
326
write_array_to_file(a1, fp)
327
self.assertEqual(fp.getvalue(), a1.tobytes())
328
329
+ def test_write_array_to_file_e(self) -> None:
330
+ a1 = np.arange(10, dtype=np.int16)[::2]
331
+ fp = BytesIO()
332
+ write_array_to_file(a1, fp, buffersize=3)
333
+ self.assertEqual(fp.getvalue(), a1.tobytes('C'))
334
+
335
+ def test_write_array_to_file_f(self) -> None:
336
+ a1 = np.empty(5, dtype=np.dtype('V0'))
337
338
+ write_array_to_file(a1, fp)
339
+ self.assertEqual(fp.getvalue(), b'')
340
#---------------------------------------------------------------------------
341
def test_array_to_tuple_array_1d_a(self) -> None:
342
a1 = np.arange(10)
0 commit comments