[Numpy-discussion] copy object with multiple subfields, including ndarrays

dmitrey openopt at ukr.net
Sun May 13 11:54:49 EDT 2007


hi all,
does anyone know howto copy an instance of class, that contains multiple 
subfields, for example
myObj.field1.subfield2 = 'asdf'
myObj.field4.subfield8 = numpy.mat('1 2 3; 4 5 6')

I tried
from copy import copy
myObjCopy = copy(myObj)
but it seems that it doesn't work correctly

Thx, D.



More information about the NumPy-Discussion mailing list