A Numeric array is mutable; it refers to allocated memory. So any subpart of it is mutable. So I suggest you use a 1-element complex numeric array as your mutable complex type.
>>> import Numeric as N >>> a = N.ones((20,20),N.Complex) >>> b = N.ravel(a[1:2,1:2]) >>> b array([ 1.+0.j]) >>> id(b) 2741696 >>> b += 1 + 1j >>> b array([ 2.+1.j]) >>> id(b) 2741696 Admittedly the str() of this object is ugly, and because Numeric isn't inheritance-friendly this is hard to work around elegantly. If this is a problem it might provide the occasion to upgrade to a newer numerical package. Still, why do you care about mutability of your complex number instances once they are outside Numeric? That seems unusual. mt _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig