On Fri, Feb 22, 2008 at 12:50 AM, Simon King <[EMAIL PROTECTED]> wrote: > > Dear William, > > > On Feb 22, 1:58 am, "William Stein" <[EMAIL PROTECTED]> wrote: > > > If I rename it to tensor.sage (not sure if this is a good idea), > > > > Yes, that's a VERY GOOD idea. It's really crazy to use a compiled > > spyx for the purposes of interfacing with the Singular interpreter > > via pexpect. > > Sorry, using a compiled spyx was just, well, let's call it my personal > tradition. > > Am i right that the loop must be re-written if it is .sage rather > than .spyx? > I think > > for i from 1<=i<=len(L[2]): > is only possible in .spyx, while in .sage it should be > for i in range(1,len(L[2])+1)
Yes, that is correct. But when you're not working with pure C data structures you're going to get no speed improvements by using > for i from 1<=i<=len(L[2]): instead of > for i in range(1,len(L[2])+1) You're just making things a little more difficult. > @John, this would explain the new error message after renaming the > file. Yes, that would. > > However, i don't know why attaching the .spyx didn't work. > > That's very suspicious: "sage: attach tensorpower.spyx Loading of file "/Users/palmieri/.sage/tensorpower.spy" has type not implemented." That suggests there is either a very very weird serious bug that got magically fixed or maybe the above log isn't what really happened -- notice that in the error message it says .spy not .spyx. -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---