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

Method test_readonly

numpy/core/tests/test_dlpack.py:109–113  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

107 self.dlpack_deleter_exception()
108
109 def test_readonly(self):
110 x = np.arange(5)
111 x.flags.writeable = False
112 with pytest.raises(BufferError):
113 x.__dlpack__()
114
115 def test_ndim0(self):
116 x = np.array(1.0)

Callers

nothing calls this directly

Calls 1

__dlpack__Method · 0.45

Tested by

no test coverage detected