[SciPy-user] Failed Build and Multiplication Question

Travis Brady travis.brady at gmail.com
Thu Jan 12 12:39:46 CST 2006


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

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.

In [36]: x = numpy.arange(24)
In [37]: x.shape = 3,2,4
In [38]: x
Out[38]:
array([[[ 0,  1,  2,  3],
        [ 4,  5,  6,  7]],

       [[ 8,  9, 10, 11],
        [12, 13, 14, 15]],

       [[16, 17, 18, 19],
        [20, 21, 22, 23]]])

In [43]: b = scipy.r_[:3]
In [44]: b.shape = 3,1
In [45]: x*b
---------------------------------------------------------------------------
ValueError: index objects are not broadcastable to a single shape.

Thanks for any help with either of these.

Travis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scipy.net/pipermail/scipy-user/attachments/20060112/cc40b57a/attachment.htm


More information about the SciPy-user mailing list