On Nov 5, 8:12 pm, Felix Lawrence <[email protected]> wrote:
> I've now built 4.6.1alpha0, and this is what I get:
>
> sage: import scipy.fftpack as Fourier
> sage: Fourier.ifft([95,20-25*i,-23,20+25*i])
> ...
> ValueError: setting an array element with a sequence.
>
> 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: Fourier.ifft([95,20-25*j,-23,20+25*j])
> ...
> NameError: name 'j' is not defined
>
> sage: Fourier.ifft([95,20-25j,-23,20+25j])
> array([ 28.+0.j,  42.+0.j,   8.+0.j,  17.+0.j])
>
> sage: Fourier.ifft([95,20-25i,-23,20+25i])
> ...
> SyntaxError: invalid syntax
>
> So it now raises an error rather than silently ignoring the I.  Not as
> convenient as it could be, but at least it doesn't give you an
> incorrect answer!
>

That seems better, yes.  I don't know whether this should really be
considered a bug then, since numpy/Python syntax probably only allows
the j without *.  Though I have to admit that "ValueError: setting an
array element with a sequence." is a little mysterious and could be
more helpful.

- 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