<div dir="ltr"><div dir="ltr"><div>Hi, could someone help me understand why this assertion fails?</div><div><br></div><div>def test_is(self):</div><div> a = np.empty(1)</div><div> b = np.empty(1)</div><div> if a.data is not b.data:</div>
<div> assert id(a.data) != id(b.data) # <-- fail</div><div><br></div><div>I'm trying to write an alternate may_share_memory function.</div><div><br></div><div>Thanks,</div><div> - James</div></div><br></div>