Author: bugman Date: Thu Jan 17 17:02:50 2008 New Revision: 4830 URL: http://svn.gna.org/viewcvs/relax?rev=4830&view=rev Log: Converted the generic_fns.value code from Numeric to numpy. Modified: 1.3/generic_fns/value.py Modified: 1.3/generic_fns/value.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/value.py?rev=4830&r1=4829&r2=4830&view=diff ============================================================================== --- 1.3/generic_fns/value.py (original) +++ 1.3/generic_fns/value.py Thu Jan 17 17:02:50 2008 @@ -21,7 +21,7 @@ ############################################################################### # Python module imports. -from Numeric import ArrayType, zeros +from numpy import ndarray, zeros from re import compile, match import sys @@ -73,7 +73,7 @@ values = other_values # List of values. - if type(val) == list or type(val) == ArrayType: + if type(val) == list or isinstance(val, ndarray): # Parameter name. for i in xrange(len(val)): params.append(param) @@ -107,7 +107,7 @@ params.append(param[i]) # Parameter value. - if type(val) == list or type(val) == ArrayType: + if type(val) == list or isinstance(val, ndarray): values.append(val[i]) else: values.append(val) @@ -116,7 +116,7 @@ # All other parameters. else: # List of values. - if type(val) == list or type(val) == ArrayType: + if type(val) == list or isinstance(val, ndarray): # Parameter name. for i in xrange(len(val)): spin_params.append(param)