Re: [Numpy-discussion] Add/multiply reduction confusion

2009-08-03 Thread Andrew Friedley
Gael Varoquaux wrote: > On Sun, Jul 05, 2009 at 02:47:18PM -0400, Andrew Friedley wrote: >> Stéfan van der Walt wrote: >>> 2009/7/5 Andrew Friedley : I found the check that does the type 'upcasting' in umath_ufunc_object.inc around line 3072 (NumPy 1.3.0). Turns out all I need to do

Re: [Numpy-discussion] Add/multiply reduction confusion

2009-07-05 Thread Gael Varoquaux
On Sun, Jul 05, 2009 at 02:47:18PM -0400, Andrew Friedley wrote: > Stéfan van der Walt wrote: > > 2009/7/5 Andrew Friedley : > >> I found the check that does the type 'upcasting' in > >> umath_ufunc_object.inc around line 3072 (NumPy 1.3.0). Turns out all I > >> need to do is make sure my add and

Re: [Numpy-discussion] Add/multiply reduction confusion

2009-07-05 Thread Andrew Friedley
Stéfan van der Walt wrote: > 2009/7/5 Andrew Friedley : >> I found the check that does the type 'upcasting' in >> umath_ufunc_object.inc around line 3072 (NumPy 1.3.0). Turns out all I >> need to do is make sure my add and multiply ufuncs are actually named >> 'add' and 'multiply' and arrays will

Re: [Numpy-discussion] Add/multiply reduction confusion

2009-07-05 Thread Stéfan van der Walt
Hi Andrew 2009/7/5 Andrew Friedley : > I figured this out in case anyone is interested. > > I found the check that does the type 'upcasting' in > umath_ufunc_object.inc around line 3072 (NumPy 1.3.0).  Turns out all I > need to do is make sure my add and multiply ufuncs are actually named > 'add'

Re: [Numpy-discussion] Add/multiply reduction confusion

2009-07-05 Thread Andrew Friedley
I figured this out in case anyone is interested. I found the check that does the type 'upcasting' in umath_ufunc_object.inc around line 3072 (NumPy 1.3.0). Turns out all I need to do is make sure my add and multiply ufuncs are actually named 'add' and 'multiply' and arrays will be upcasted app

[Numpy-discussion] Add/multiply reduction confusion

2009-06-29 Thread Andrew Friedley
Hi, I'm trying to understand how integer types are upcast for add/multiply operations for my GSoC project (Implementing Ufuncs using CorePy). The documentation says that for reduction with add/multiply operations, integer types are 'upcast' to the int_ type (int64 on my system). What exactly