Changeset 245


Ignore:
Timestamp:
05/26/10 08:23:10 (6 years ago)
Author:
mmckerns
Message:

bugfix for ticket #110

Location:
mystic
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • mystic/examples/test_mogi.py

    r117 r245  
    115115    desol, dstepmon = de_solve() 
    116116    print "desol: ", desol 
    117     print "dstepmon 10: ", dstepmon.x[50] 
    118     print "dstepmon 20: ", dstepmon.x[100] 
     117    print "dstepmon 50: ", dstepmon.x[50] 
     118    print "dstepmon 100: ", dstepmon.x[100] 
    119119    # 
    120120    # this will try to use nelder_mean from a relatively "near by" point (very sensitive) 
  • mystic/mystic/tools.py

    r242 r245  
    133133 
    134134    def __call__(self, x, y): 
     135        from numpy import ndarray 
     136        if isinstance(x,ndarray): x = list(x) 
    135137        self._x.append(x) 
    136138        self._y.append(y) 
     
    154156    import numpy 
    155157    def __init__(self, interval = 10, xinterval = numpy.inf): 
    156         Sow.__init__(self) 
     158       #Sow.__init__(self) 
     159        super(VerboseSow,self).__init__() 
    157160        self._step = 0 
    158161        self._yinterval = interval 
     
    161164    def __call__(self, x, y): 
    162165        from numpy import ndarray 
    163         Sow.__call__(self, x, y) 
     166       #Sow.__call__(self, x, y) 
     167        super(VerboseSow,self).__call__(x, y) 
    164168        if isinstance(y,(list,ndarray)): 
    165169            y = y[0] #XXX: get the "best" fit... which should be in y[0] 
     
    183187    def __init__(self, interval=1, filename='log.txt', new=False): 
    184188        import datetime 
    185         Sow.__init__(self) 
     189       #Sow.__init__(self) 
     190        super(LoggingSow,self).__init__() 
    186191        self._filename = filename 
    187192        self._step = 0 
     
    198203        self._file = open(self._filename,'a') 
    199204        from numpy import ndarray 
    200         Sow.__call__(self, x, y) 
     205       #Sow.__call__(self, x, y) 
     206        super(LoggingSow,self).__call__(x, y) 
    201207        if isinstance(y,(list,ndarray)): 
    202208            y = y[0] #XXX: get the "best" fit... which should be in y[0] 
Note: See TracChangeset for help on using the changeset viewer.