On 27 October 2016 at 11:21, Jori Mäntysalo <jori.mantys...@uta.fi> wrote: > On Thu, 27 Oct 2016, Vincent Delecroix wrote: > >> 1) What is [a, b, c, d, e]? > > > Arghs, forgot the definition list: > > R.<a, b, c, d, e> = QQ['a, b, c, d, e'] > >> 2) Your would better replace >> >> [a, b, c, d, e][randint(0,4)] >> >> by >> >> choice([a,b,c,d,e]) > > > That means using plain Python function to get a random number. I don't know > if it plays well with Sage random state.
choice is pure Python >>> import random >>> random.choice <bound method Random.choice of <random.Random object at 0x11d1890>> > But in any case, this is just a test code to see how well Singular works. It helps if it is easier to read. Concerning your code, it got stuck on the first run? What is the degree of the polynomial you are trying to factorize? -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.