Hello everyone,

I'd like to know if it is required practice to cast the types of the
objects being compared or if Sage should be able to deal with it
automatically?

Because I have a problem where I need to explicitely cast an
numpy.int32 vector unit for the comparison with a Sage Integer to be
reliable. It would sometimes see a '1' Integer not being the same as a
'1' numpy.int32 value.

This behaviour _cannot_ be reproduced with a minimal example such as:

import numpy

if numpy.int32(1) != sage.rings.integer.Integer(1):
    print("Should not go here...")


If someone wants to dig to the root of the problem, I can gladly
provide my complete program.

-- 
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