Author: bugman Date: Mon Jul 13 15:22:33 2009 New Revision: 9208 URL: http://svn.gna.org/viewcvs/relax?rev=9208&view=rev Log: align_tensor.init() can now accept any type of float or int (python or numpy). Modified: 1.3/prompt/align_tensor.py Modified: 1.3/prompt/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/align_tensor.py?rev=9208&r1=9207&r2=9208&view=diff ============================================================================== --- 1.3/prompt/align_tensor.py (original) +++ 1.3/prompt/align_tensor.py Mon Jul 13 15:22:33 2009 @@ -30,6 +30,7 @@ # relax module imports. import help from generic_fns import align_tensor +from num_types import int_list, float_list from relax_errors import RelaxError, RelaxBoolError, RelaxFloatError, RelaxIntError, RelaxNoneListstrError, RelaxNoneStrError, RelaxNumTupleError, RelaxStrError @@ -262,11 +263,12 @@ if len(params) != 5: raise RelaxError, "The alignment tensor parameters argument must be a tuple of numbers of length 5." for i in xrange(len(params)): - if type(params[i]) != float and type(params[i]) != int: + if type(params[i]) not in float_list and type(params[i]) not in int_list: + print type(params[i]) raise RelaxNumTupleError, ('alignment tensor parameters', params) # Scale argument. - if type(scale) != float: + if type(scale) not in float_list: raise RelaxFloatError, ('scale', scale) # Angle units argument. @@ -274,7 +276,7 @@ raise RelaxStrError, ('angle units', angle_units) # Parameter types argument. - if type(param_types) != int: + if type(param_types) not in int_list: raise RelaxIntError, ('parameter types', param_types) # The errors flag.