Here's why there's a discrepancy:
sage: import scipy.fftpack as Fourier
sage: Fourier.ifft([95,20-25*i,-23,20+25*i])
array([ 28.0+0.j,  29.5-0.j,   8.0+0.j,  29.5+0.j])
sage: Fourier.ifft([95,20,-23,20])
array([ 28.0+0.j,  29.5-0.j,   8.0+0.j,  29.5+0.j])
sage: sage: Fourier.ifft([95,20-25j,-23,20+25j])
array([ 28.+0.j,  42.+0.j,   8.+0.j,  17.+0.j])

I encountered a similar bug in numpy last week when using
numpy.loadtxt - any terms involving 'I' were ignored.  I think it's an
upstream problem.  In my case I could get around it since loadtxt
accepts a list of converters, and you send it this one:
lambda s: complex(s.replace('i','j'))

Does anyone know if this is fixed in newer versions of numpy/scipy?

Cheers,
Felix


On Nov 3, 2:43 am, kcrisman <[email protected]> wrote:
> Dear support,
>
> We get some inconsistencies with using I and j in scipy.  Is there
> some reason these should be different?
>
> sage: import scipy.fftpack as Fourier
> sage: Fourier.ifft([95,20-25*i,-23,20+25*i])
> array([ 28.0+0.j,  29.5-0.j,   8.0+0.j,  29.5+0.j])
> sage: Fourier.ifft([95,20-25j,-23,20+25j])
> array([ 28.+0.j,  42.+0.j,   8.+0.j,  17.+0.j])
>
> Thanks for the help,
> - kcrisman

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to