Hi all,

I am facing an issue upgrading numpy from 1.5.1 to 1.6.1.
In numPy 1.6, the casting behaviour for ufunc has changed and has become stricter.

Can someone advise how to implement the below simple example which worked in 1.5.1 but fails in 1.6.1?

>>> import numpy as np
>>> def add(a,b):
...    return (a+b)
>>> uadd = np.frompyfunc(add,2,1)
>>> uadd
<ufunc 'add (vectorized)'>
>>> uadd.accumulate([1,2,3])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: could not find a matching type for add (vectorized).accumulate, requested type has type code 'l'

Thanks,
Aditya