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

2019-07-26 Thread Ram Rachum
focus 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 >>>

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

2019-07-25 Thread Francesc Alted
;> > > Hi Ram, >> > > >> > > No, NumPy doesn’t have a way. And it newer versions, it probably >> > > won’t create two arrays if all the dtypes match, it’ll do some >> > > magic to re use the existing ones, although it will use multiple >>

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

2019-07-24 Thread Juan Nunez-Iglesias
arrays if all the dtypes match, it’ll do some > > > magic to re use the existing ones, although it will use multiple > > > loops instead of just one. > > > > > > You might want to look into NumExpr or Numba if you want an > > > efficient implementation. &g

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

2019-07-24 Thread Francesc Alted
instead of just one. > > > > > > You might want to look into NumExpr or Numba if you want an > > > efficient implementation. > > > > > > Get Outlook for iOS > > > > > > From: NumPy-Discussion < > > > numpy-discussion-bounces+einstein.e

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

2019-07-23 Thread Sebastian Berg
look into NumExpr or Numba if you want an > > efficient implementation. > > > > Get Outlook for iOS > > > > From: NumPy-Discussion < > > numpy-discussion-bounces+einstein.edison=gmail@python.org> on > > behalf of Ram Rachum > > Sent: Tue

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

2019-07-23 Thread Stanley Seibert
- > *From:* NumPy-Discussion gmail@python.org> on behalf of Ram Rachum > *Sent:* Tuesday, July 23, 2019 7:29 pm > *To:* numpy-discussion@python.org > *Subject:* [Numpy-discussion] Creating a sine wave with exponential decay > > > Hi everyone! Total Numpy ne

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

2019-07-23 Thread Hameer Abbasi
efficient implementation. Get Outlook for iOS<https://aka.ms/o0ukef> From: NumPy-Discussion on behalf of Ram Rachum Sent: Tuesday, July 23, 2019 7:29 pm To: numpy-discussion@python.org Subject: [Numpy-discussion] Creating a sine wave with exponential deca

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

2019-07-23 Thread Ram Rachum
Hi everyone! Total Numpy newbie here. I'd like to create an array with a million numbers, that has a sine wave with exponential decay on the amplitude. In other words, I want the value of each cell n to be sin(n) * 2 ** (-n * factor). What would be the most efficient way to do that? Someone sug