Author: bugman Date: Tue Jul 22 14:44:17 2014 New Revision: 24607 URL: http://svn.gna.org/viewcvs/relax?rev=24607&view=rev Log: The minimise.grid_search user function can now properly handle preset values of NaN. This occurs when the parameter vector contains values of None due to the parameter not being set and then the Python list being converted to a numpy array. The value of NaN is now caught and the parameter is no longer identified as being preset. Modified: branches/zooming_grid_search/pipe_control/minimise.py Modified: branches/zooming_grid_search/pipe_control/minimise.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/pipe_control/minimise.py?rev=24607&r1=24606&r2=24607&view=diff ============================================================================== --- branches/zooming_grid_search/pipe_control/minimise.py (original) +++ branches/zooming_grid_search/pipe_control/minimise.py Tue Jul 22 14:44:17 2014 @@ -28,6 +28,7 @@ # relax module imports. from lib.errors import RelaxError, RelaxIntListIntError, RelaxLenError +from lib.float import isNaN from lib.io import write_data from multi import Processor_box from pipe_control.mol_res_spin import return_spin, spin_loop @@ -304,7 +305,7 @@ upper_i = param_object.grid_upper(names[i], model_info=model_info) # Skip preset values. - if skip_preset and not values[i] in [None, {}, []]: + if skip_preset and not values[i] in [None, {}, []] and not isNaN(values[i]): lower_i = values[i] upper_i = values[i] model_inc[-1][i] = 1