[SciPy-user] Failed Build and Multiplication Question

Travis Oliphant oliphant.travis at ieee.org
Thu Jan 12 14:50:20 CST 2006


Travis Brady wrote:

> I just updated from SVN and the NumPy build (on win2k with MingW using 
> Gary's instructions from the Wiki) failed with the following error:
>
>     error: Command "gcc -O2 -Wall -Wstrict-prototypes
>     -Ibuild\src\numpy\core\src -Inumpy\core\include
>     -Ibuild\src\numpy\core
>     -Inumpy\core\src
>     -Inumpy\lib\..\core\include
>     -IC:\Python24\include
>     -IC:\Python24\PC
>     -c build\src\numpy\core\src\umathmodule.c
>     -o build\temp.win32- 
> 2.4\Release\build\src\numpy\core\src\umathmodule.o" failed with exit 
> status 1

Thanks for not posting the entire build log, but please show the actual 
error message that caused this failure.

>
> Also, I have a 3x2x4 array that I'd like to be able to multiple 
> elementwise with a 3x1 column vector, I can't currently do this w/o a 
> loop of some kind, but I'm thinking there must be a better way.

Read the section on broadcasting in the sample chapters of the book online.

x*b[:,newaxis,newaxis]

should work (do it before you change the shape of b)

or

b.shape = (3,1,1)

x*b

should also work.

-Travis

>SciPy-user at scipy.net
>http://www.scipy.net/mailman/listinfo/scipy-user
>  
>



More information about the SciPy-user mailing list