mailr4853 - /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 18, 2008 - 14:04:
Author: bugman
Date: Fri Jan 18 14:04:09 2008
New Revision: 4853

URL: http://svn.gna.org/viewcvs/relax?rev=4853&view=rev
Log:
Bug fix for the assemble_param_vector() method.

The value of None is replaced by 0.0 to avoid NaNs.


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=4853&r1=4852&r2=4853&view=diff
==============================================================================
--- branches/N_state_model/specific_fns/n_state_model.py (original)
+++ branches/N_state_model/specific_fns/n_state_model.py Fri Jan 18 14:04:09 
2008
@@ -72,6 +72,11 @@
             param_vector.append(alpha[i])
             param_vector.append(beta[i])
             param_vector.append(gamma[i])
+
+        # Convert all None values to zero (to avoid conversion to NaN).
+        for i in xrange(len(param_vector)):
+            if param_vector[i] == None:
+                param_vector[i] = 0.0
 
         # Return a numpy arrary.
         return array(param_vector, float64)




Related Messages


Powered by MHonArc, Updated Fri Jan 18 16:00:32 2008