On 5/29/10 3:58 PM, Ryan Hinton wrote:
The following results are strange.

sage: import numpy as np
sage: t1 = np.array([3+1])
sage: t2 = t1[0]
sage: t3 = 0
sage: max(t2, t3)
0
sage: min(t2, t3)
4

I get the same results putting t2 and t3 in a tuple for the other max/
min calling convention.  But the comparison operator seems to be fine.

sage: t2>  t3
True

Any ideas?

- Ryan



Did you set min and max to be variables?  Can you try reset('min,max')

Things work fine for me:

sage: sage: import numpy as np
sage: sage: t1 = np.array([3+1])
sage: sage: t2 = t1[0]
sage: sage: t3 = 0
sage: sage: max(t2, t3)
4
sage: sage: min(t2, t3)
0
sage: version()
'Sage Version 4.4.2, Release Date: 2010-05-19'

(I have one or two patches on top of that, though)

Jason


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to