On Jan 12, 12:04 am, "Steve Yarbro" <[email protected]> wrote: > My thanks to Harald S., this was an excellent example.
glad to help you, this example is just a working one, maybe there are better ways to do the same thing... i.e. a more "sage"-way where you use numpy's polyfit only implicitly. > For example, using zip() to produce > a list to use with list_plot (which worked great!)? I was getting an error > with the numpy arrays. I can't really answer your question. At first, you have to know that there is a so called "preparser". This is a generally helpful thing to work with Sage, but in this case not so good. Here, it converts basic python number types to sage number types. This is not good if you want to build a numpy array, there you want basic python types. In conclusion, there is more than one type of floating point number ... The zip command is very basic python and combines two lists into a single list of tuples, x1,x2,x3 and y1, y2, y3 -> (x1,y1),(x2,y2), ... and those are the coordinates of the points for list_plot. I'm not aware of any special things that happen to the number types!? Third, what exactly did you do when you got that other error? Please provide us here with a small example so we can pinpoint the problem. Harald --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
