mailr4755 - /branches/N_state_model/specific_fns/n_state_model.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 15, 2008 - 15:43:
Author: bugman
Date: Tue Jan 15 15:43:05 2008
New Revision: 4755

URL: http://svn.gna.org/viewcvs/relax?rev=4755&view=rev
Log:
Converted the variable inc into a list of ints (equal to the value of inc) if 
it is an int.


Modified:
    branches/N_state_model/specific_fns/n_state_model.py

Modified: branches/N_state_model/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/specific_fns/n_state_model.py?rev=4755&r1=4754&r2=4755&view=diff
==============================================================================
--- branches/N_state_model/specific_fns/n_state_model.py (original)
+++ branches/N_state_model/specific_fns/n_state_model.py Tue Jan 15 15:43:05 
2008
@@ -82,13 +82,20 @@
         # The number of parameters.
         n = self.param_num()
 
-        # Test the grid search options.
-        self.test_grid_ops(lower=lower, upper=upper, inc=inc, n=n)
-
         # Make sure that the length of the parameter array is > 0.
         if n == 0:
             print "Cannot run a grid search on a model with zero parameters, 
skipping the grid search."
             return
+
+        # Test the grid search options.
+        self.test_grid_ops(lower=lower, upper=upper, inc=inc, n=n)
+
+        # If inc is a single int, convert it into an array of that value.
+        if type(inc) == int:
+            temp = []
+            for j in xrange(n):
+                temp.append(inc)
+            inc = temp
 
         # Initialise the grid_ops structure.
         grid_ops = []




Related Messages


Powered by MHonArc, Updated Tue Jan 15 16:00:12 2008