On Tue, 19 Apr 2005, James Graham wrote:
So I've ben trying to use the fitting function with functions that (I discovered) internally require complex algebra even though the answer is real. Clearly this doesn't work because the arrays are of a float type. Is there a way to work around this (e.g. by defining a function on the command line that takes the free parameters as arguments and returns the results and fitting against that), or a way to fix this (using complex arrays internally and converting to real arrays for display - though I would worry about possible implications of this)?
You could try something like: (x.astype(Complex64)**2.).real Does that make sense?? Jeremy -- Jeremy Sanders <[EMAIL PROTECTED]> http://www.jeremysanders.net/ Cambridge, UK Public Key Server PGP Key ID: E1AAE053
