[SciPy-User] [SciPy-user] ValueError: The truth value of an array with more than one element is ambiguous.
Thu Apr 5 18:10:01 CDT 2012
My only thought is that Xa, Ya, and/or Za are arrays? That array will show
up if you have say:
a = [False, True]
On Thu, Apr 5, 2012 at 5:46 PM, surfcast23 <firstname.lastname@example.org> wrote:
> 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: ValueError: The truth value of an array
> with more than one element is ambiguous.<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<http://old.nabble.com/Scipy-User-f33045.html>at Nabble.com.
> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User