Re: [Numpy-discussion] Add guaranteed no-copy to array creation and reshape?

2018-12-29 Thread Sebastian Berg
On Sat, 2018-12-29 at 17:16 +0100, Matthias Geier wrote: > Hi Sebastian. > > I don't have an opinion (yet) about this matter, but I have a > question: > > On Thu, Dec 27, 2018 at 12:30 AM Sebastian Berg wrote: > > [...] > > > new_arr = arr.reshape(new_shape) > > assert np.may_share_memory(arr,

Re: [Numpy-discussion] Add guaranteed no-copy to array creation and reshape?

2018-12-29 Thread Matthias Geier
Hi Sebastian. I don't have an opinion (yet) about this matter, but I have a question: On Thu, Dec 27, 2018 at 12:30 AM Sebastian Berg wrote: [...] > new_arr = arr.reshape(new_shape) > assert np.may_share_memory(arr, new_arr) > > # Which is sometimes -- but should not be -- written as: > arr.sha