>> I want to apply a function (myfunc which takes and returns a scalar) to each
>> element in a multi-dimensioned array (data):
>>
>> I can do this:
>>
>> newdata = numpy.array([myfunc(d) for d in data.flat]).reshape(data.shape)
>>
>> But I'm wondering if there's a faster more numpy way. I've looke
Elfnor wrote:
> Hi
>
> I want to apply a function (myfunc which takes and returns a scalar) to each
> element in a multi-dimensioned array (data):
>
> I can do this:
>
> newdata = numpy.array([myfunc(d) for d in data.flat]).reshape(data.shape)
>
> But I'm wondering if there's a faster more numpy wa
Hi
I want to apply a function (myfunc which takes and returns a scalar) to each
element in a multi-dimensioned array (data):
I can do this:
newdata = numpy.array([myfunc(d) for d in data.flat]).reshape(data.shape)
But I'm wondering if there's a faster more numpy way. I've looked at the
vectori