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
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 loops instead of just one.
You might want to look into NumExpr or Numba if you want an efficie
Hi all,
There will be a NumPy Community meeting Wednesday July 24 at 11 am
Pacific Time. Everyone is invited to join in and edit the work-in-
progress meeting topics and notes:
https://hackmd.io/76o-IxCjQX2mOXO_wwkcpg
Best wishes
Sebastian
signature.asc
Description: This is a digitally signed
(Full disclosure: I work on Numba...)
Just to note, the NumPy implementation will allocate (and free) more than 2
arrays to compute that expression. It has to allocate the result array for
each operation as Python executes. That expression is equivalent to:
s1 = newfactor * x
s2 = np.exp(s1)
s3
On Tue, 2019-07-23 at 13:38 -0500, Stanley Seibert wrote:
> (Full disclosure: I work on Numba...)
>
> Just to note, the NumPy implementation will allocate (and free) more
> than 2 arrays to compute that expression. It has to allocate the
> result array for each operation as Python executes. Tha
Folks,
This NEP is a proposing a standard policy for the community to determine
when we age-out support for old versions of Python. This came out of
in-person discussions at SciPy earlier in July and scattered discussion
across github. This is being proposed by maintainers from Matplotlib,
scikit