[Tutor] least squares
Jason Child
jasonchild at cnsp.com
Thu Dec 16 22:42:30 CET 2004
well, not sure if there is a module with the function you are looking
for, but...
#sloppy as hell method:
#...
if str(my_returned_value).find("-") != -1:
return my_returned_value #or whatever you want to do with it
#...
#slightly less sloppy as hell method:
if my_returned_value < 0:
return my_returned_value
mdcooper wrote:
>Hi there,
>
>I am trying to run a least squares program (written by Konrad Hinsen) but I
>would like to only have positive values returned. Can anyone help is altering
>the code to do this?
>
>Thanks,
>
>matthew
>
>
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>
>
More information about the Tutor
mailing list