Mark Dickinson <dicki...@gmail.com> added the comment:
Hmm. On second thoughts, the proposed solution wouldn't actually *help* with the situation I gave: the elements (lazily) realised from the NumPy array are highly likely to all end up with the same address in RAM. :-( >>> x = np.full(10, np.nan) >>> for v in x: ... print(id(v)) ... del v ... 4601757008 4601757008 4601757008 4601757008 4601757008 4601757008 4601757008 4601757008 4601757008 4601757008 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43475> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com