The truth value of an array with more than one element is ambigous when trying to index an array
- by user1440194
I am trying to put all elements of rbs into a new array if the elements in var(another numpy array) is =0 and <=.1 . However when I try the following code I get this error:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
rbs = [ish[4] for ish in realbooks]
for book in realbooks:
var -= float(str(book[0]).replace(":", ""))
bidsred = rbs[(var <= .1) and (var >=0)]
any ideas on what I'm doing wrong?