Re: [Numpy-discussion] An alternative to vectorize that lets you access the array?

2020-07-13 Thread Sebastian Berg
On Mon, 2020-07-13 at 15:45 +0300, Ram Rachum wrote: > Thank you Sebastian and Andras for your detailed replies. > > Sebastian, your suggestion of adding `item.item()` solved my problem! > Now > the for loop is still slower than vectorize, but by a smaller factor, > and > that's fast enough for my

Re: [Numpy-discussion] An alternative to vectorize that lets you access the array?

2020-07-13 Thread Ram Rachum
Thank you Sebastian and Andras for your detailed replies. Sebastian, your suggestion of adding `item.item()` solved my problem! Now the for loop is still slower than vectorize, but by a smaller factor, and that's fast enough for my demonstration. My problem is solved and I'm very happy! I also tr