[Numpy-discussion] Multiple-field indexing: view vs copy in 1.14+

Marten van Kerkwijk m.h.vankerkwijk at gmail.com
Mon Jan 22 10:11:08 EST 2018


Hi Allan,

I think on the consistency argument is perhaps the most important:
views are very powerful and in many ways one *counts* on them
happening, especially in working with large arrays. They really should
be used everywhere it is possible. In this respect, I think one has to
weigh breakage of some code against time spent solving unexpected bugs
because a view is *not* taken (the change in MaskedArray to ensure the
mask is always viewed instead of copied is another example of trying
to move as much as possible in that direction).

Anyway, in favour of views.

All the best,

Marten


More information about the NumPy-Discussion mailing list