-lmkl_lapack64 on i368 ??

Hi, I'm trying to update numpy by compiling the up to date svn: I get this error : gcc: numpy/linalg/lapack_litemodule.c gcc -pthread -shared build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o -lmkl_lapack32 -lmkl_lapack64 -lmkl -lvml -lguide -lpthread -o build/lib.linux-i686-2.4/numpy/linalg/lapack_lite.so /usr/bin/ld: cannot find -lmkl_lapack64 collect2: ld returned 1 exit status /usr/bin/ld: cannot find -lmkl_lapack64 collect2: ld returned 1 exit status error: Command "gcc -pthread -shared build/temp.linux-i686-2.4/numpy/linalg/lapack_litemodule.o -lmkl_lapack32 -lmkl_lapack64 -lmkl -lvml -lguide -lpthread -o build/lib.linux-i686-2.4/numpy/linalg/lapack_lite.so" failed with exit status 1 There must be something wrong in the distutils/makefile because I'm on a debian sid *i386* so why should I link against mkl_lapack64 ?? Of course, I do not have lapack64 installed on this i386 machine. -- ############################################ Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: gnata@obs.univ-lyon1.fr ############################################

Hi Everyone, I am finding that numpy cannot operate on boolean arrays. For example, the following does not work: x=3Darray([(1,2),(2,1),(3,1),(4,1)]) x[x[:,0]>x[:,1] and x[1:]>1,:] It gives me an syntax error: ------------------- Traceback (most recent call last): File "<pyshell#74>", line 1, in <module> x[x[:,0]>x[:,1] and x[1:]>1,:] ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() ------------------- However, this is not what I want. I want a "piece-wise" "AND" operation on the two boolean vectors. In other words, the row is selected if both are true. How do I accomplish this? Many thanks, Geoffrey P.S The disclaimer is automatically generated by the mail server. _______________________________________________________=0A= =0A= The information in this email or in any file attached=0A= hereto is intended only for the personal and confiden-=0A= tial use of the individual or entity to which it is=0A= addressed and may contain information that is propri-=0A= etary and confidential. If you are not the intended=0A= recipient of this message you are hereby notified that=0A= any review, dissemination, distribution or copying of=0A= this message is strictly prohibited. This communica-=0A= tion is for information purposes only and should not=0A= be regarded as an offer to sell or as a solicitation=0A= of an offer to buy any financial product. Email trans-=0A= mission cannot be guaranteed to be secure or error-=0A= free. P6070214

Geoffrey Zhu wrote:
Hi Everyone,
I am finding that numpy cannot operate on boolean arrays. For example, the following does not work:
x=3Darray([(1,2),(2,1),(3,1),(4,1)])
x[x[:,0]>x[:,1] and x[1:]>1,:]
It gives me an syntax error:
------------------- Traceback (most recent call last): File "<pyshell#74>", line 1, in <module> x[x[:,0]>x[:,1] and x[1:]>1,:] ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() -------------------
However, this is not what I want. I want a "piece-wise" "AND" operation on the two boolean vectors. In other words, the row is selected if both are true. How do I accomplish this?
The "and" keyword tries to coerce each of its operands into a Boolean True or False value. This behavior cannot be overridden in the current Python language to yield arrays of Boolean values. However, for Boolean arrays, the bitwise logical operations &, |, and ~ work just fine for this purpose instead of "and", "or", and "not". -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

Robert Kern wrote:
Geoffrey Zhu wrote:
Hi Everyone,
I am finding that numpy cannot operate on boolean arrays. For example, the following does not work:
x=3Darray([(1,2),(2,1),(3,1),(4,1)])
x[x[:,0]>x[:,1] and x[1:]>1,:]
It gives me an syntax error:
------------------- Traceback (most recent call last): File "<pyshell#74>", line 1, in <module> x[x[:,0]>x[:,1] and x[1:]>1,:] ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() -------------------
However, this is not what I want. I want a "piece-wise" "AND" operation on the two boolean vectors. In other words, the row is selected if both are true. How do I accomplish this?
The "and" keyword tries to coerce each of its operands into a Boolean True or False value. This behavior cannot be overridden in the current Python language to yield arrays of Boolean values. However, for Boolean arrays, the bitwise logical operations &, |, and ~ work just fine for this purpose instead of "and", "or", and "not".
except that their precedence is higher than that of the logical operators, so one must remember to use parentheses: (a<b) & (c>d) which is good for clarity anyway. Eric

Eric Firing wrote:
Robert Kern wrote:
Geoffrey Zhu wrote:
Hi Everyone,
I am finding that numpy cannot operate on boolean arrays. For example, the following does not work:
x=3Darray([(1,2),(2,1),(3,1),(4,1)])
x[x[:,0]>x[:,1] and x[1:]>1,:]
It gives me an syntax error:
------------------- Traceback (most recent call last): File "<pyshell#74>", line 1, in <module> x[x[:,0]>x[:,1] and x[1:]>1,:] ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() -------------------
However, this is not what I want. I want a "piece-wise" "AND" operation on the two boolean vectors. In other words, the row is selected if both are true. How do I accomplish this?
The "and" keyword tries to coerce each of its operands into a Boolean True or False value. This behavior cannot be overridden in the current Python language to yield arrays of Boolean values. However, for Boolean arrays, the bitwise logical operations &, |, and ~ work just fine for this purpose instead of "and", "or", and "not".
except that their precedence is higher than that of the logical operators, so one must remember to use parentheses: (a<b) & (c>d) which is good for clarity anyway.
Eric
Hi, Well maybe it is a bug on my box (thunderbird) but the topic of the thread is "-lmkl_lapack64 on i368 ??". Nothing to do with "Logical Selector" ;) Should I post another mail about this topic? Xavier ps : I'm just sorry for the noise if it is a bug on my side. -- ############################################ Xavier Gnata CRAL - Observatoire de Lyon 9, avenue Charles André 69561 Saint Genis Laval cedex Phone: +33 4 78 86 85 28 Fax: +33 4 78 86 83 86 E-mail: gnata@obs.univ-lyon1.fr ############################################

Xavier Gnata wrote:
Well maybe it is a bug on my box (thunderbird) but the topic of the thread is "-lmkl_lapack64 on i368 ??". Nothing to do with "Logical Selector" ;) Should I post another mail about this topic?
Xavier ps : I'm just sorry for the noise if it is a bug on my side.
No, I think that Geoffrey Zhu accidentally hit "Reply" to your message instead of creating a new thread as he should have. We don't mean to hijack your thread, but mistakes happen. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

Hi,
Well maybe it is a bug on my box (thunderbird) but the topic of the thread is "-lmkl_lapack64 on i368 ??". Nothing to do with "Logical Selector" ;) Should I post another mail about this topic?
Xavier ps : I'm just sorry for the noise if it is a bug on my side.
--
Hi Xavier, I didn't know mailing lists track threads. The messages look all independent in Microsoft Outlook. So I just hit reply on your message, changed the title, and put in my message... Sorry about that. Geoffrey _______________________________________________________=0A= =0A= The information in this email or in any file attached=0A= hereto is intended only for the personal and confiden-=0A= tial use of the individual or entity to which it is=0A= addressed and may contain information that is propri-=0A= etary and confidential. If you are not the intended=0A= recipient of this message you are hereby notified that=0A= any review, dissemination, distribution or copying of=0A= this message is strictly prohibited. This communica-=0A= tion is for information purposes only and should not=0A= be regarded as an offer to sell or as a solicitation=0A= of an offer to buy any financial product. Email trans-=0A= mission cannot be guaranteed to be secure or error-=0A= free. P6070214
participants (4)
-
Eric Firing
-
Geoffrey Zhu
-
Robert Kern
-
Xavier Gnata