Re: [Numpy-discussion] can't take FFT of ndarray

2009-03-06 Thread charles reid
Fixed the problem - I was importing a bunch of numbers from a file, and I wasn't casting them as doubles. Thanks for the help! Charles On Fri, Mar 6, 2009 at 4:26 PM, Charles R Harris wrote: > > > On Fri, Mar 6, 2009 at 4:22 PM, charles reid wrote: > >> In [3]: mixfracarray=array(mixfrac) >> >

Re: [Numpy-discussion] can't take FFT of ndarray

2009-03-06 Thread Charles R Harris
On Fri, Mar 6, 2009 at 4:22 PM, charles reid wrote: > In [3]: mixfracarray=array(mixfrac) > > In [4]: mixfracarray.dtype > Out[4]: dtype('|S17') > It's a string array. What does your file look like and how do you import it? Chuck ___ Numpy-discussion

Re: [Numpy-discussion] can't take FFT of ndarray

2009-03-06 Thread Matthieu Brucher
This indicates that the values are strings, so you can't make an FFT from them. Convert your array to float or double array first. Matthieu 2009/3/7 charles reid : > In [3]: mixfracarray=array(mixfrac) > > In [4]: mixfracarray.dtype > Out[4]: dtype('|S17') > > > > On Fri, Mar 6, 2009 at 4:09 PM,

Re: [Numpy-discussion] can't take FFT of ndarray

2009-03-06 Thread charles reid
In [3]: mixfracarray=array(mixfrac) In [4]: mixfracarray.dtype Out[4]: dtype('|S17') On Fri, Mar 6, 2009 at 4:09 PM, Charles R Harris wrote: > > > On Fri, Mar 6, 2009 at 3:51 PM, charles reid wrote: > >> In [3]: type(mixfrac) >> Out[3]: >> >> In [4]: mixfracarray=array(mixfrac) >> >> In [5]:

Re: [Numpy-discussion] can't take FFT of ndarray

2009-03-06 Thread Charles R Harris
On Fri, Mar 6, 2009 at 3:51 PM, charles reid wrote: > In [3]: type(mixfrac) > Out[3]: > > In [4]: mixfracarray=array(mixfrac) > > In [5]: type(mixfracarray) > Out[5]: > > Try mixfracarray.dtype ...Chuck ___ Numpy-discussion mailing list Numpy-discus

Re: [Numpy-discussion] can't take FFT of ndarray

2009-03-06 Thread charles reid
In [3]: type(mixfrac) Out[3]: In [4]: mixfracarray=array(mixfrac) In [5]: type(mixfracarray) Out[5]: (Is that what you were referring to?) On Fri, Mar 6, 2009 at 3:44 PM, Charles R Harris wrote: > > > On Fri, Mar 6, 2009 at 3:36 PM, charles reid wrote: > >> Hi there - >> >> I've imported s

Re: [Numpy-discussion] can't take FFT of ndarray

2009-03-06 Thread Charles R Harris
On Fri, Mar 6, 2009 at 3:36 PM, charles reid wrote: > Hi there - > > I've imported some data from a file, and it's in a list called mixfrac. > I'd like to take the Fourier transform of the data, but when I try to take > the FFT of the list, I get this error: > > --

Re: [Numpy-discussion] can't take FFT of ndarray

2009-03-06 Thread charles reid
Hi there - I've imported some data from a file, and it's in a list called mixfrac. I'd like to take the Fourier transform of the data, but when I try to take the FFT of the list, I get this error: --- TypeError