On Jun 5, 2009, at 3:09 AM, Stan Schymanski wrote: > Dear all, > > In Fortran, numbers can be written in the form of e.g. 1.2d-6 instead > of 1.2e-6, but if I import a text file with such numbers into sage > using numpy, the 'd' notation does not get recognised and I get an > error. Is there a way to import such numbers without too much hassle? > > Thanks for your help!
That would require changing the preparser, and as Python doesn't accept numbers of this format, I don't know that we'd want to depart from that. If your text file is all numbers, you could do a replace. sage: s = "1d2 1.5d4 3.2d-100" sage: s.replace('d', 'e') '1e2 1.5e4 3.2e-100' - 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 -~----------~----~----~----~------~----~------~--~---