[Numpy-discussion] fixing up datetime

Charles R Harris charlesr.harris@gmail....
Tue Jun 7 11:09:57 CDT 2011

On Tue, Jun 7, 2011 at 9:54 AM, Robert Kern <robert.kern@gmail.com> wrote:

> On Tue, Jun 7, 2011 at 07:34, Dave Hirschfeld <dave.hirschfeld@gmail.com>
> wrote:
> > I'm not convinced about the events concept - it seems to add complexity
> > for something which could be accomplished better in other ways. A [Y]//4
> > dtype is better specified as [3M] dtype, a [D]//100 is an [864S]. There
> > may well be a good reason for it however I can't see the need for it in
> my
> > own applications.
> Well, [D/100] doesn't represent [864s]. It represents something that
> happens 100 times a day, but not necessarily at precise regular
> intervals. For example, suppose that I am representing payments that
> happen twice a month, say on the 1st and 15th of every month, or the
> 5th and 20th. I would use [M/2] to represent that. It's not [2W], and
> it's not [15D]. It's twice a month.
> The default conversions may seem to imply that [D/100] is equivalent
> to [864s], but they are not intended to. They are just a starting
> point for one to write one's own, more specific conversions.
> Similarly, we have default conversions from low frequencies to high
> frequencies defaulting to representing the higher precision event at
> the beginning of the low frequency interval. E.g. for days->seconds,
> we assume that the day is representing the initial second at midnight
> of that day. We then use offsets to allow the user to add more
> information to specify it more precisely.
Ah, it's a new concept: DeltaTime as a container of events ;) And what did
you do during Summer vacation?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110607/05a9aaf6/attachment.html 

More information about the NumPy-Discussion mailing list