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

Method test___array__

numpy/core/tests/test_multiarray.py:5773–5786  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5771 assert_(self.b.flat[4] == 12.0)
5772
5773 def test___array__(self):
5774 c = self.a.flat.__array__()
5775 d = self.b.flat.__array__()
5776 e = self.a0.flat.__array__()
5777 f = self.b0.flat.__array__()
5778
5779 assert_(c.flags.writeable is False)
5780 assert_(d.flags.writeable is False)
5781 assert_(e.flags.writeable is True)
5782 assert_(f.flags.writeable is False)
5783 assert_(c.flags.writebackifcopy is False)
5784 assert_(d.flags.writebackifcopy is False)
5785 assert_(e.flags.writebackifcopy is False)
5786 assert_(f.flags.writebackifcopy is False)
5787
5788 @pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts")
5789 def test_refcount(self):

Callers

nothing calls this directly

Calls 2

assert_Function · 0.90
__array__Method · 0.45

Tested by

no test coverage detected