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

Method test_empty_array

numpy/core/tests/test_memmap.py:207–215  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

205 assert_equal(mm.shape, (2,))
206
207 def test_empty_array(self):
208 # gh-12653
209 with pytest.raises(ValueError, match='empty file'):
210 memmap(self.tmpfp, shape=(0,4), mode='w+')
211
212 self.tmpfp.write(b'\0')
213
214 # ok now the file is not empty
215 memmap(self.tmpfp, shape=(0,4), mode='w+')

Callers

nothing calls this directly

Calls 2

memmapClass · 0.90
writeMethod · 0.45

Tested by

no test coverage detected