Keith Goodman wrote:
> 
> 
> 
> Or maybe this is cleaner:
> 
>>> [date.month==1 for date in A[:,0]]
>    [True, True, False, True]
> 
> which can be used like this:
> 
>>> idx = np.array([date.month==1 for date in A[:,0]])
>>> A[idx,:]
> 
> array([[2010-01-01, 1],
>        [2010-01-02, 2],
>        [2010-01-05, 4]], dtype=object)
> _______________________________________________
> NumPy-Discussion mailing list
> 

That's the keeper! Thanks for the responses.
-- 
View this message in context: 
http://old.nabble.com/dates%2C-np.where-finding-months-tp27242195p27248729.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.

_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to