Ask Your Question

# Revision history [back]

### complex, real, common ring, crash in 'vector' constructor

(x,y,z) = var('x,y,z') x = z.real_part() y = z.imag_part() test = vector((x,1,1)) test = vector((x,y,1)) test = vector((z.real_part,1,1))

Last line causes an error, can't find common ring for all elements.
These variables all have type "Expression"; but some expressions denote complex numbers and some denote real numbers. How do I tell sage about that? (Sage 6.5 on Mac OS 10).

 2 No.2 Revision tmonteil 18853 ●22 ●132 ●349 http://wiki.sagemath.o...

### complex, real, common ring, crash in 'vector' constructor

(x,y,z) = var('x,y,z')
x = z.real_part()
y = z.imag_part()
test = vector((x,1,1))
test = vector((x,y,1))
test = vector((z.real_part,1,1))vector((z.real_part,1,1))


Last line causes an error, can't find common ring for all elements.
These variables all have type "Expression"; but some expressions denote complex numbers and some denote real numbers. How do I tell sage about that? (Sage 6.5 on Mac OS 10).