mailr23733 - /branches/disp_spin_speed/target_functions/relax_disp.py


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

Header


Content

Posted by tlinnet on June 08, 2014 - 19:48:
Author: tlinnet
Date: Sun Jun  8 19:48:27 2014
New Revision: 23733

URL: http://svn.gna.org/viewcvs/relax?rev=23733&view=rev
Log:
Important fix for extracting the correct shape to create new arrays.

If using just one field, or having the same number of dispersion points, the 
shape would extend to the dispersion number.
It would report [ei][si][mi][oi][di] when calling ndarray.shape.

Shape always has to be reported as: [ei][si][mi][oi].

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
models for Clustered analysis.

Modified:
    branches/disp_spin_speed/target_functions/relax_disp.py

Modified: branches/disp_spin_speed/target_functions/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/target_functions/relax_disp.py?rev=23733&r1=23732&r2=23733&view=diff
==============================================================================
--- branches/disp_spin_speed/target_functions/relax_disp.py     (original)
+++ branches/disp_spin_speed/target_functions/relax_disp.py     Sun Jun  8 
19:48:27 2014
@@ -397,7 +397,9 @@
         # Setup special numpy array structures, for higher dimensional 
computation.
         if model == MODEL_CR72_FULL:
             # Get the shape of back_calc structure.
-            back_calc_shape = list( np.asarray(self.back_calc).shape )
+            # If using just one field, or having the same number of 
dispersion points, the shape would extend to that number.
+            # Shape has to be: [ei][si][mi][oi].
+            back_calc_shape = list( np.asarray(self.back_calc).shape )[:4]
 
             # Find which frequency has the maximum number of disp points.
             # To let the numpy array operate well together, the broadcast 
size has to be equal for all shapes.




Related Messages


Powered by MHonArc, Updated Sun Jun 08 20:00:02 2014