Changeset 2446b66 in sasview


Ignore:
Timestamp:
Jun 15, 2011 5:45:19 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
bdc25e2
Parents:
dc613d6
Message:

moved scipy import to compute function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • park_integration/ScipyFitting.py

    r4fb520d r2446b66  
    99import numpy  
    1010import sys 
    11 from scipy import optimize 
     11 
    1212 
    1313from sans.fit.AbstractFitEngine import FitEngine 
     
    142142        if handler is not None: 
    143143            handler.set_result(result=result) 
    144         #try: 
    145         functor = SansAssembly(self.param_list, model, data, handler=handler, 
    146                          fitresult=result, curr_thread= self.curr_thread) 
    147144        try: 
     145            # This import must be here; otherwise it will be confused when more 
     146            # than one thread exist. 
     147            from scipy import optimize 
     148             
     149            functor = SansAssembly(self.param_list, model, data, handler=handler,\ 
     150                         fitresult=result, curr_thread= curr_thread) 
    148151            out, cov_x, _, mesg, success = optimize.leastsq(functor, 
    149152                                            model.get_params(self.param_list), 
Note: See TracChangeset for help on using the changeset viewer.