Author: bugman Date: Fri Jun 6 10:10:00 2014 New Revision: 23682 URL: http://svn.gna.org/viewcvs/relax?rev=23682&view=rev Log: Fix for a number of the frame order models which do not have parameter constraints. This change to the grid_search() API method is similar to the change for the minimise() method (r23211). The linear_constraint() function was returning A, b = [], [] for these models, but these empty numpy arrays were causing the dot product with A to fail in the grid_search() API method. These values are now caught and the constraint algorithm turned off. Modified: branches/frame_order_cleanup/specific_analyses/frame_order/api.py Modified: branches/frame_order_cleanup/specific_analyses/frame_order/api.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/api.py?rev=23682&r1=23681&r2=23682&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/api.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/api.py Fri Jun 6 10:10:00 2014 @@ -479,10 +479,19 @@ else: indices[j] = 0 + # Linear constraints. + A, b = None, None + if constraints: + A, b = linear_constraints(scaling_matrix=scaling_matrix) + + # Constraint flag set but no constraints present. + if A != None and len(A) == 0: + if verbosity: + warn(RelaxWarning("The '%s' model parameters are not constrained, turning the linear constraint algorithm off." % cdp.model)) + constraints = False + # Eliminate all points outside of constraints (useful for the pseudo-ellipse models). if constraints: - A, b = linear_constraints(scaling_matrix=scaling_matrix) - # Construct a new point array. new_pts = [] for i in range(total_pts):