On Friday, October 23, 2015 at 6:20:19 AM UTC-7, Nathann Cohen wrote: > > I do not see why matrix.row(0) should return a *copy* of the row when > the matrix is immutable. >
It depends on the implementation. I think most matrices allocate their element store as a contiguous block. Hence the vectors aren't available as individual objects to own/reference. You would need a vector object that remembers it's addressing part of the data of another object (and hence keep that object alive). This actually sounds like a "view" object, which python internally has for some things. I'd expect scipy/numpy also have good tools for it. It really depends on your application whether doing this is a good or a horrible idea, though. But certainly the object lifetime considerations give a very good reason why our first implementations didn't bother. -- 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 http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.