On 10/7/2010 3:45 PM, [email protected] wrote: > what's your namespace?from scipy import log >>>> log(int(-2)) > (0.69314718055994529+3.1415926535897931j)
This should explain: and...@flyer:~$ python Enthought Python Distribution -- http://www.enthought.com Version: 6.2-2 (64-bit) Python 2.6.5 |EPD 6.2-2 (64-bit)| (r265:79063, Mar 22 2010, 17:32:05) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from numpy import * >>> log(int(-2)) nan >>> from scipy import * >>> log(int(-2)) (0.69314718055994529+3.1415926535897931j) >>> R = ones(2) >>> R[0] = R[0] * 1j >>> R array([ 0., 1.]) >>> R = ones(2, 'complex') >>> R[0] = R[0] * 1j >>> R array([ 0.+1.j, 1.+0.j]) Best Regards, Andrew Mullhaupt _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
