> > def _leastSquare():
> > # do the thing that might generate negatives
> >
> > def leastSquare():
> > firstTry = _leastSquare()
> > if firstTry < 0:
> > return leastSquare() # try again
> > else:
> > return firstTry
> >
> > Primitive but it works. If you want more a e
Hi Pierre,
you are correct - the methods that simply refuse negative results will not be
sufficient.
The code I have so far is attached as *.py files.
Thanks,
Matt
Be aware that I have adusted _lsq2.py so that it can be shown to the world -
it still contains a basic outline of what should be d
Alan Gauld a écrit :
I am trying to use a least squares method (the one written by Konrad
Hinsen),
but I do not want the method to be able to generate negative values.
Is there
a way to stop least squares programs from doing so?
def _leastSquare():
# do the thing that might generate negatives
> I am trying to use a least squares method (the one written by Konrad
Hinsen),
> but I do not want the method to be able to generate negative values.
Is there
> a way to stop least squares programs from doing so?
def _leastSquare():
# do the thing that might generate negatives
def leastSquar
mdcooper wrote:
Hello all,
I am trying to use a least squares method (the one written by Konrad Hinsen),
but I do not want the method to be able to generate negative values. Is there
a way to stop least squares programs from doing so?
I have probably not included enough information but I am not