On Fri, Feb 20, 2009 at 7:57 AM, pong <wypon...@gmail.com> wrote: > > I expect to get a 3 x 2 integer matrix with entries between -10 to 10 > by typing > > sage: A =random_matrix(ZZ,3,2, x in [-10..10]) > sage: A > > but what I got is > > [16 1] > [-2 2] > [ 0 0] > > so why 16 appears? It is a bug? if it's just a misunderstanding of the > command from me, sorry. >
It's a misunderstanding of the command. Notice that sage: x in [-10..10] False so you're really doing A =random_matrix(ZZ,3,2, False) whatever that does. You want: sage: random_matrix(ZZ,3,2,x=-10,y=10) [-8 -9] [ 7 6] [-1 3] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---