[Nipy-devel] Re: traitswrap

Jonathan Taylor jonathan.taylor at stanford.edu
Mon May 22 22:21:45 CDT 2006


my example didn't come through quite correctly:
---------------------------------------------
import enthought.traits.ui
from enthought.traits import *
import numpy as N

class Test1(HasTraits):
    x = Trait(N.ndarray)
    y = Trait(float)
    z = Trait(43.)
    w = Trait(Float)

   
a = Test1(x=N.zeros((4,5)))
a.configure_traits()

class Test2(HasTraits):
    x = Array(shape=(4,None))
   
b = Test2(x=N.zeros((4,5)), ax=N.ones((3,1)))
b.configure_traits()

b.x = N.zeros((4,3))
b.configure_traits()



-- 
------------------------------------------------------------------------
I'm part of the Team in Training: please support our efforts for the
Leukemia and Lymphoma Society!

http://www.active.com/donate/tntsvmb/tntsvmbJTaylor

GO TEAM !!!

------------------------------------------------------------------------
Jonathan Taylor                           Tel:   650.723.9230
Dept. of Statistics                       Fax:   650.725.8977
Sequoia Hall, 137                         www-stat.stanford.edu/~jtaylo
390 Serra Mall
Stanford, CA 94305




More information about the Nipy-devel mailing list