From: Matt K. <mat...@ho...> - 2006-10-07 20:12:03
|
Could someone please point me to/provide me with a basic example of creatin= g a user defined type? =20 Here is my completely naive attempt which obviously doesn't work...import n= umpy =20 class myType(numpy.void): def __init__(self,val): self.val =3D va= l =20 testType =3D numpy.dtype(myType) val1 =3D myType(5)val2 =3D myType(6) =20 foo =3D numpy.array([val1,val2],testType) =20 =20 Any help would be greatly appreciated. Thanks, =20 - Matt Knox =20 =20 _________________________________________________________________ Be one of the first to try Windows Live Mail. http://ideas.live.com/programpage.aspx?versionId=3D5d21c51a-b161-4314-9b0e-= 4911fb2b2e6d= |