On Apr 9, 2009, at 3:34 AM, Flavio Coelho wrote: > Hi I having trouble with running code within sage which runs perfectly > in straight Python:
... > TypeError: array cannot be safely cast to required type > > can anyone tell me if this is a Sage "bug" or "feature" ;-) My guess is that it's a NumPy bug--NumPy doesn't play well with Sage types (including floating point numbers). One reason we do this is so that sage: 1/3 actually gives the rational number 1/3, rather than 0 (or some floating point approximation). Sage code is run through a preparser that wraps literals in Sage types. - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---