[Numpy-discussion] Complex arange

Russel Howe russel@appliedminds....
Thu Feb 1 19:34:38 CST 2007

> arange(1j, 5j, 1) do? Numeric raises an exception here, and I thing  
> numpy
> should, too.

The same as arange(1, 5, 1j) - an empty array since it takes 0 of the  
step to cross the distance.  But something like
arange(1j, 5j, 1j) seems fine.  As does arange(1j, 3+5j, 2+1j) which  
should give [ 1j, 2+2j ].  The idea is to walk by step up to the edge  
of the box.  I seem to recall a discussion of why this was a bad idea  
a while ago on this list, but I can't find it...

The exception is a good answer too, but it should probably happen for  
all complex arguments, since most seem to return an empty array now.

they're all fine hovses.

More information about the Numpy-discussion mailing list