Re: hanning python

2009-09-10 Thread pdpi
On Sep 9, 7:01 pm, sturlamolden wrote: > On 9 Sep, 16:57, pdpi wrote: > > > Raising this to 1 million, rather than 100, nodes in the window, the > > timing difference between your version and NumPy's is tiny (but numpy > > still edges you out, but just barely), but they trounce my naive > > versi

Re: hanning python

2009-09-09 Thread sturlamolden
On 9 Sep, 16:57, pdpi wrote: > Raising this to 1 million, rather than 100, nodes in the window, the > timing difference between your version and NumPy's is tiny (but numpy > still edges you out, but just barely), but they trounce my naive > version, being around 7 or 8 times faster the list compr

Re: hanning python

2009-09-09 Thread pdpi
On Sep 9, 3:46 pm, pdpi wrote: > On Sep 9, 3:27 am, sturlamolden wrote: > > > On 9 Sep, 00:24, Steven D'Aprano > > > wrote: > > > A decent vendor-supplied implementation will include error checking that > > > you otherwise would need to implement yourself, so yes. > > > Not for code like this: >

Re: hanning python

2009-09-09 Thread pdpi
On Sep 9, 3:27 am, sturlamolden wrote: > On 9 Sep, 00:24, Steven D'Aprano > > wrote: > > A decent vendor-supplied implementation will include error checking that > > you otherwise would need to implement yourself, so yes. > > Not for code like this: > > > > >>> import numpy as np > >>> n = np.ara

Re: hanning python

2009-09-08 Thread sturlamolden
On 9 Sep, 00:24, Steven D'Aprano wrote: > A decent vendor-supplied implementation will include error checking that > you otherwise would need to implement yourself, so yes. Not for code like this: >>> import numpy as np >>> n = np.arange(101) >>> w = 0.5*(1.0-np.cos(2*np.pi*n/(100.))) --

Re: hanning python

2009-09-08 Thread Steven D'Aprano
On Tue, 08 Sep 2009 11:12:18 -0700, sturlamolden wrote: > On 8 Sep, 15:08, pdpi wrote: > >> Come, come. I think it's a good rule that, where available, a vendor- >> supplied implementation is the preferable choice until proven >> otherwise. > > Even for the simplest of equations? A decent vend

Re: hanning python

2009-09-08 Thread Andreas Waldenburger
On Tue, 8 Sep 2009 11:12:18 -0700 (PDT) sturlamolden wrote: > On 8 Sep, 15:08, pdpi wrote: > > > Come, come. I think it's a good rule that, where available, a > > vendor- supplied implementation is the preferable choice until > > proven otherwise. > > Even for the simplest of equations? > Yes

Re: hanning python

2009-09-08 Thread sturlamolden
On 8 Sep, 15:08, pdpi wrote: > Come, come. I think it's a good rule that, where available, a vendor- > supplied implementation is the preferable choice until proven > otherwise. Even for the simplest of equations? -- http://mail.python.org/mailman/listinfo/python-list

Re: hanning python

2009-09-08 Thread pdpi
On Sep 8, 1:55 pm, sturlamolden wrote: > On 8 Sep, 13:36, Pierre wrote: > > > anyone knows what is the python equivalent of the matlab's hanning > > function. > > > Note that in matlab hann and hanning are different. > > If you don't know how to compute a von Hann window, you are not > competent

Re: hanning python

2009-09-08 Thread sturlamolden
On 8 Sep, 13:36, Pierre wrote: > anyone knows what is the python equivalent of the matlab's hanning > function. > > Note that in matlab hann and hanning are different. If you don't know how to compute a von Hann window, you are not competent to do any scientific programming. Seriously! I assume

Re: hanning python

2009-09-08 Thread pdpi
On Sep 8, 12:36 pm, Pierre wrote: > Hello, > > anyone knows what is the python equivalent of the matlab's hanning > function. > > Note that in matlab hann and hanning are different. > > Thanks ! I assume you mean the tapering function mentioned here: http://mathworld.wolfram.com/HanningFunction.h

hanning python

2009-09-08 Thread Pierre
Hello, anyone knows what is the python equivalent of the matlab's hanning function. Note that in matlab hann and hanning are different. Thanks ! -- http://mail.python.org/mailman/listinfo/python-list