Re: [Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2012-01-20 Thread Pascal Lamblin
Hi everyone, A long time ago, Aditya Sethi 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?

Re: [Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2011-09-20 Thread Aditya Sethi
Understood. Thanks Olivier, Stefan. On Tue, Sep 20, 2011 at 9:18 AM, Olivier Delalleau wrote: > He is using the development version of Numpy, which is probably the main > difference (I tried it too with Numpy 1.6.1 on an x86_64 Linux architecture > and got the same bug). > If you want to use an

Re: [Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2011-09-20 Thread Olivier Delalleau
He is using the development version of Numpy, which is probably the main difference (I tried it too with Numpy 1.6.1 on an x86_64 Linux architecture and got the same bug). If you want to use an official Numpy release you'll probably need to downgrade to 1.5.x and wait until the next Numpy release.

Re: [Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2011-09-20 Thread Aditya Sethi
Hi, Stefan, which version of Python and NumPy are you using? I am upgrading Python and NumPy, and would like to get it working on the official releases of Python 2.7.2 + NumPy 1.6.1 In Python 2.6 + NumPy 1.5.1 on win32, it works. In Python 2.7.2 + NumPy 1.6.1 on win32, np.frompyfunc(add,2,1).acc

Re: [Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2011-09-19 Thread Stéfan van der Walt
On Mon, Sep 19, 2011 at 4:18 PM, Aditya Sethi wrote: > But uadd.accumulate(..) or uadd.reduce(..) fail with error: >  ValueError: could not find a matching type for add (vectorized).accumulate > ( or (vectorized).reduce ) > Apologies, I should have been more clear before. In the development versi

Re: [Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2011-09-19 Thread Aditya Sethi
Hi Stefan, The problem arises when you try to use methods of the ufunc. So for the custom universal function previously defined, uadd: uadd([1,2,3],[1,2,3]) works fine. But uadd.accumulate(..) or uadd.reduce(..) fail with error: ValueError: could not find a matching type for add (vectorized).acc

Re: [Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2011-09-19 Thread Stéfan van der Walt
Hi, On Mon, Sep 19, 2011 at 2:38 PM, Aditya Sethi wrote: > 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 fa

[Numpy-discussion] Upgrade to 1.6.x: frompyfunc() ufunc casting issue

2011-09-19 Thread Aditya Sethi
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): ...