mailr4770 - /branches/N_state_model/maths_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 16, 2008 - 09:58:
Author: bugman
Date: Wed Jan 16 09:58:52 2008
New Revision: 4770

URL: http://svn.gna.org/viewcvs/relax?rev=4770&view=rev
Log:
Changed the full_tensors, R, and RT structures in N_state_opt to be pure 
numpy objects.


Modified:
    branches/N_state_model/maths_fns/n_state_model.py

Modified: branches/N_state_model/maths_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/N_state_model/maths_fns/n_state_model.py?rev=4770&r1=4769&r2=4770&view=diff
==============================================================================
--- branches/N_state_model/maths_fns/n_state_model.py (original)
+++ branches/N_state_model/maths_fns/n_state_model.py Wed Jan 16 09:58:52 2008
@@ -21,7 +21,7 @@
 
###############################################################################
 
 # Python module imports.
-from numpy import float64, zeros
+from numpy import array, float64, zeros
 
 # relax module imports.
 from chi2 import chi2
@@ -57,16 +57,13 @@
         self.N = N
         self.params = 1.0 * init_params    # Force a copy of the data to be 
stored.
         self.total_num_params = len(init_params)
-        self.full_tensors = full_tensors
+        self.full_tensors = array(full_tensors, float64)
         self.red_data = red_data
         self.red_errors = red_errors
 
-        # Initialise some empty matrices for storage of the transient 
rotation matricies and their transposes.
-        self.R = []
-        self.RT = []
-        for i in xrange(N):
-            self.R.append(zeros((3,3), float64))
-            self.RT.append(zeros((3,3), float64))
+        # Initialise some empty numpy objects for storage of the transient 
rotation matricies and their transposes.
+        self.R = zeros((N,3,3), float64)
+        self.RT = zeros((N,3,3), float64)
 
 
     def func(self, params):




Related Messages


Powered by MHonArc, Updated Wed Jan 16 10:20:29 2008