[Numpy-discussion] element-wise array segmental function operation?

2015-03-23 Thread oyster
Hi, all I want to know wether there is a terse way to apply a function to every array element, where the function behaves according to the element value. for example [code] def fun(v): if 0=v60: return f1(v)#where f1 is a function elif 60=v70: return f2(v) elif

Re: [Numpy-discussion] element-wise array segmental function operation?

2015-03-23 Thread Julian Taylor
On 23.03.2015 07:46, oyster wrote: Hi, all I want to know wether there is a terse way to apply a function to every array element, where the function behaves according to the element value. for example [code] def fun(v): if 0=v60: return f1(v)#where f1 is a function