Dear Nicolas , Thank you
I shall be careful in writing in future. Sincerely Biswajit On Wednesday, 1 February 2017 19:54:11 UTC+5:30, Nicolas M. Thiery wrote: > > Dear Biswajit, > > On Wed, Feb 01, 2017 at 06:04:40AM -0800, Biswajit Ransingh wrote: > > dia = DiGraph({'x0':{'x1':(1, -1),'y1':(1, -1),'x2':(1, > > -1)},'y2':{'x0':(1, -1),'x1':(1, -1)}}) > > diaout = dia.neighbors_out('x0');diaout > > prod(p for p in diaout) > > ︡18c0ec18-9974-4cda-b0ba-0ff01686a9fa︡{"stderr":"Error in lines > > 1-1\nTraceback (most recent call last):\n File > > > \"/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/ > > sage_server.py\", line 976, in execute\n exec compile(block+'\\n', > > '', 'single') in namespace, locals\n File \"\", line 1, in > <module>\n > > File \"sage/misc/misc_c.pyx\", line 126, in sage.misc.misc_c.prod > > > (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/misc_c.c:2021)\ > > n return iterator_prod(x, z)\n File \"sage/misc/misc_c.pyx\", > line > > 229, in sage.misc.misc_c.iterator_prod > > > (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/misc_c.c:2719)\ > > n x = sub_prods[tip] * x\nTypeError: can't multiply sequence by > > non-int of type 'str'\n"}︡{"done":true}︡ > > This is rather cryptic, and it is rather inconvenient to have half of > the question in the subject line and half in the text. Please prepare > an easier to read message next time. > > Alternatively, you may want to use ask.sagemath.org. > > diaout is a list of strings: > > sage: diaout = dia.neighbors_out('x0');diaout > ['x2', 'y1', 'x1'] > > If you want to see them as variables, you have to convert them > explicitly: > > sage: prod(SR(v) for v in diaout) > x1*x2*y1 > > Best regards, > Nicolas > -- > Nicolas M. Thiéry "Isil" <nth...@users.sf.net <javascript:>> > http://Nicolas.Thiery.name/ > -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.