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 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.