Hi Jason,

Sorry for the multiple answers:

> >> However, I really wonder whether this fix is necessary. I understand the
> >> the bug pointed out is a bad bug, but I think that when I call
> >> zero_matrix() I will usually quickly modify the returned matrix. Are
> >> there many useful situations where it is important that M =
> >> zero_matrix() return very fast and where we _aren't_ going to modify M?
> >>
> >
> > If M is a matrix space, will M(0) return an immutable matrix with this 
> > change?
> 
> Here is the current behavior with the patch applied:
> 
> sage: MM = MatrixSpace(ZZ, 3,3)
> sage: MM(0).is_mutable()
> True

Note that if you want an brand new matrix you should call M() that is the
default constructor and not M(0) which is a coercion.

Cheers,

Florent

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to