[SciPy-User] [SciPy-user] ValueError: The truth value of an array with more than one element is ambiguous.

surfcast23 surfcast23@gmail....
Thu Apr 5 17:46:54 CDT 2012


Hi,

 I have an if statement and what I want it to do is go through arrays and
find the common elements in all three arrays. When I try the code below I
get this error


ValueError: The truth value of an array with more than one element is
ambiguous. Use a.any() or a.all()


Can some one explain the error to me and how I might be able to fix it.
Thanks in advance.


if min <= Xa <=max & min <= Ya <=max & min <= Za <=max:
     print("in range")
else:
  print("Not in range")
      
-- 
View this message in context: http://old.nabble.com/ValueError%3A-The-truth-value-of-an-array-with-more-than-one-element-is-ambiguous.-tp33583156p33583156.html
Sent from the Scipy-User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120405/0f99b0e5/attachment.html 


More information about the SciPy-User mailing list