[SciPy-User] frequency components of a signal buried in a noisy time domain signal
Sat Feb 27 12:32:31 CST 2010
Thanks Robert. I figured that after I sent the question, but I am not sure
if the search based solution offers any advantage in terms of speed.
Besides, and not that it matters really, but that solution restricts the
usage to max 2**32 integer result on 32 bit machines, whereas log based one
>>> def nextpow2(n):
... return 2**(np.ceil(np.log2(n)))
On 27 February 2010 13:02, Robert Kern <email@example.com> wrote:
> On Sat, Feb 27, 2010 at 04:02, Ivo Maljevic <firstname.lastname@example.org>
> > David,
> > Nice way of avoiding log2, but how do you determine the length of your
> > array?
> The input arrays can only be so large. Even on 64-bit machines, the
> table need not have more than 64 entries.
> tab = 2 ** np.arange(np.iinfo(np.intp).bits)
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User