Re: [Numpy-discussion] Accessing fields of the object stored in numpy array

2010-02-18 Thread Vishal Rana
Thanks Friedrich it helped. On Thu, Feb 18, 2010 at 2:45 AM, Friedrich Romstedt < friedrichromst...@gmail.com> wrote: > Hello Vishal, > > 2010/2/18 Vishal Rana : > > > a = np.array([dt.datetime(2010, 2, 17), dt.datetime(2010, 2, 16), > > dt.datetime(2010, 2, 15)]) > > b = np.array([dt.datetime(20

Re: [Numpy-discussion] Accessing fields of the object stored in numpy array

2010-02-18 Thread Friedrich Romstedt
Hello Vishal, 2010/2/18 Vishal Rana : > a = np.array([dt.datetime(2010, 2, 17), dt.datetime(2010, 2, 16), > dt.datetime(2010, 2, 15)]) > b = np.array([dt.datetime(2010, 2, 14), dt.datetime(2010, 2, 13), > dt.datetime(2010, 2, 12)]) > c=a-b > c.days (a numpy array of days difference) like: > arra

[Numpy-discussion] Accessing fields of the object stored in numpy array

2010-02-17 Thread Vishal Rana
Hi, I have a numpy arrays with datetime objects as: a = np.array([dt.datetime(2010, 2, 17), dt.datetime(2010, 2, 16), dt.datetime(2010, 2, 15)]) b = np.array([dt.datetime(2010, 2, 14), dt.datetime(2010, 2, 13), dt.datetime(2010, 2, 12)]) I want doing a-b should give me days difference as numpy a