MCPcopy Create free account
hub / github.com/numpy/numpy / test_ducktyping

Function test_ducktyping

numpy/lib/tests/test_io.py:2675–2686  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2673
2674
2675def test_ducktyping():
2676 a = np.random.random((5, 5))
2677
2678 s = BytesIO()
2679 f = JustWriter(s)
2680
2681 np.save(f, a)
2682 f.flush()
2683 s.seek(0)
2684
2685 f = JustReader(s)
2686 assert_array_equal(np.load(f), a)
2687
2688
2689

Callers

nothing calls this directly

Calls 6

assert_array_equalFunction · 0.90
JustWriterClass · 0.85
JustReaderClass · 0.85
randomMethod · 0.80
seekMethod · 0.80
flushMethod · 0.45

Tested by

no test coverage detected