"John [H2O]" <[email protected]> wrote
--> 196 ind = np.where( (t1 < Y[:,0] < t2) ) #same result
TypeError: can't compare datetime.datetime to numpy.ndarray
Have you checked what you are comparing?
Try printing Y[:,0]
It looks like an invalid test and no amolunt of parenthesising
or 'and'ing will make it work.
--> 196 ind = np.where( (Y[:,0]>t1) and (Y[:,0]<t2) )
ValueError: The truth value of an array with more than one element is
ambiguous. Use a.any() or a.all()
Looks like the Y[:,0] value is not compatible with the time t1 or t2.
What does
print Y[:,0]
produce?
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor