Any comments on this? it's really strange that when getting a vector from the matrix a
>> b = a[:,0] you have to use an extra index when you want to select an element from that vector b: >> b[0][0] instead of just b[0] (this gives a list with 1 element...) Christophe On Mar 19, 3:39 pm, Christophe Oosterlynck <tif...@gmail.com> wrote: > Hi, > > let me dive straight into my problem wit a simple example: > > >> a = identity_matrix(ZZ,2,2) > >> a[0,0] > > 1 > > vs. > > >> a[:,0] > > [1] > [0]>> a[:,0][0] > > (1) > > So when selecting an element from a matrix by first selecting a row > and selecting the wanted element in that new 'row object', I don't get > an element from ZZ but a FreeModuleElement. > Why is this happening? Is there a way to make my two actions behave > like selecting an element from the original matrix? > > Thanks, > > Christophe --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---