[Numpy-discussion] Re: indexing problem

Travis Oliphant oliphant at ee.byu.edu
Mon Feb 13 14:08:03 EST 2006


Tim Hochberg wrote:

>
> I've been trying to look into the problem described below, but I just 
> can't find where complex multiplication is being done (all the other 
> multiplication, but not complex). Could someone with a grasp of the 
> innards of numpy please point me in the right direction?

Look in the build directory for __umath_generated.c.  In there you will 
see that multiplication for complex numbers is done using PyUFunc_FF_F 
and friends (i.e. using a generic interface for wrapping a "scalar" 
function).   The scalar function wrapped into a ufunc vectorized 
function is given in multiply_data.  In that file you should see it 
present as nc_prodf, nc_prod, nc_prodl.

nc_prod and friends are implemented in umathmodule.c.src

-Travis





More information about the NumPy-Discussion mailing list