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

2020-07-13 Thread Ram Rachum
ian Berg > wrote: > >> On Sun, 2020-07-12 at 16:00 +0300, Ram Rachum wrote: >> > Hi everyone, >> > >> > Here's a problem I've been dealing with. I wonder whether NumPy has a >> > tool >> > that will help me, or whether this could be a useful

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

2020-07-12 Thread Ram Rachum
wrote: > On Sun, 2020-07-12 at 16:00 +0300, Ram Rachum wrote: > > Hi everyone, > > > > Here's a problem I've been dealing with. I wonder whether NumPy has a > > tool > > that will help me, or whether this could be a useful feature request. > > > > In

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

2020-07-12 Thread Ram Rachum
r any other kind of solution to my problem? Thanks for your help, Ram Rachum. ___ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Creating a sine wave with exponential decay

2019-07-26 Thread Ram Rachum
on making good use of arrays, >>> > NumPy array functions, and array expressions in your code. If you >>> > have to write for loops (if there is no good way to do the operation >>> > with existing NumPy functions), I would reach for something like >>> >

[Numpy-discussion] Creating a sine wave with exponential decay

2019-07-23 Thread Ram Rachum
suggested I do something like this: y = np.sin(x) * np.exp(newfactor * x) But this would create 2 arrays, wouldn't it? Isn't that wasteful? Does Numpy provide an efficient way of doing that without creating a redundant array? Thanks for your help, Ram Rachum