On 02/28/2010 08:17 PM, josef.p...@gmail.com wrote:
> On Sun, Feb 28, 2010 at 1:51 PM, Xavier Gnata wrote:
>
>> Hi,
>>
>> I'm sure I reinventing the wheel with the following code:
>> from numpy import *
>> from scipy import polyfit,stats
>>
>> def f(x,y,z):
>>return x+y+z
>> M=fromfunction(
On Sun, Feb 28, 2010 at 1:51 PM, Xavier Gnata wrote:
> Hi,
>
> I'm sure I reinventing the wheel with the following code:
> from numpy import *
> from scipy import polyfit,stats
>
> def f(x,y,z):
> return x+y+z
> M=fromfunction(f,(2000,2000,10))
>
> def foo(M):
> ramp=where(M<1000)[0]
is thi
Hi,
I'm sure I reinventing the wheel with the following code:
from numpy import *
from scipy import polyfit,stats
def f(x,y,z):
return x+y+z
M=fromfunction(f,(2000,2000,10))
def foo(M):
ramp=where(M<1000)[0]
l=len(ramp)
t=arange(l)
if(l>1):
return polyfit(t,ramp,1)[0]