[sage-support] Re: Making the an inmutable sequence mutable.

2011-01-08 Thread Volker Braun
There is no official way to un-immutable something as it wouldn't be immutable then. The only way is to make a new list/Sequence with a copy of the elements. The new container is then mutable again, since it is only copy: v_copy = [ x for x in v_immutable ] If you modify the copy, the original

[sage-support] Re: Making the an inmutable sequence mutable.

2011-01-08 Thread Trollkemada
That's the opositte, i want, having a INMUTABLE sequence, make it MUTABLE. Not the other way around. On 8 ene, 22:56, Volker Braun wrote: > The two possible ways are > > v = Sequence([1,2,3],immutable=True) > > or > > v = Sequence([1,2,3]) > v.set_immutable() > > You should never mess with "under

[sage-support] Re: Making the an inmutable sequence mutable.

2011-01-08 Thread Volker Braun
The two possible ways are v = Sequence([1,2,3],immutable=True) or v = Sequence([1,2,3]) v.set_immutable() You should never mess with "underscore" attributes if you haven't actually written the code as these implementation details can change without warning. The documentation is displayed by

[sage-support] timeit : a function with or without result ?

2011-01-08 Thread Francois Maltey
Hello, I play with the famous timeit function. I don't understand if this function sends a result or only gives a displayed text. I test : timeit ('2+3') # In these 2 cases Sage displays 625 loops... res=timeit ('2+3) # the res variable contains . The r

[sage-support] Making the an inmutable sequence mutable.

2011-01-08 Thread Trollkemada
Hi all, I would like to know how to make mutable an inmutable sequence. I have been told there are two ways to do that: The first way is using the flag v._is_immutable=False. Anyone can give me a link to the SAGE documentation about this "_is_immutable" thing? I really need something -a documenta

[sage-support] Re: error when loading symbolic matrix ("no endswith attribute")

2011-01-08 Thread ricardomayerb
Thanks! R On Jan 8, 2:57 pm, John Cremona wrote: > Look at the documentation for load (by typing load?) > > The correct syntax is > > load ('foomat') > > It returns the saved object.  Hence: > > sage: foomat2 = load('foomat') > sage: foomat == foomat2 > True > > John Cremona > > On Jan 8, 4:41 p

[sage-support] Re: error when loading symbolic matrix ("no endswith attribute")

2011-01-08 Thread John Cremona
Look at the documentation for load (by typing load?) The correct syntax is load ('foomat') It returns the saved object. Hence: sage: foomat2 = load('foomat') sage: foomat == foomat2 True John Cremona On Jan 8, 4:41 pm, ricardomayerb wrote: > Hello everyone, > > My desired result and probabl

[sage-support] error when loading symbolic matrix ("no endswith attribute")

2011-01-08 Thread ricardomayerb
Hello everyone, My desired result and probably the context of the problem to understand it better: -> Well, I'd like to load some previously saved symbolic matrices. There are several of then and they are time consuming to compute. So ideally I'd like to just load them every time instead of comput