[Numpy-discussion] RFC: A (second) proposal for implementing some date/time types in NumPy

Pierre GM pgmdevlist@gmail....
Mon Jul 28 15:10:43 CDT 2008


On Monday 28 July 2008 12:17:41 Francesc Alted wrote:

> So, for allowing this to happen, we have concluded that a
> conceptual change in our second proposal is needed: instead of
> a 'resolution', we can introduce the 'time unit' concept.

I'm all for that, thanks !

> One thing that will not be possible though, is
> to change the time unit of a relative time expressed in say, years, to
> another time unit expressed in say, days.  This is because the
> impossibility to know how many days has a year that is relative (i.e.
> not bound to a given year).  

OK, that makes sense for timedeltas. But would I still be able to add a 
timedelta['Y'] (in years) to a datetime['D'] (in days) and get the proper 
result ?


> More in general, it will not be possible 
> to perform 'time unit' conversions between units above and below a
> relative week (because it is the maximum time unit that has a definite
> number of seconds).

Could you rephrase that ? You're still talking about conversion for timedelta, 
not datetime, right ?

> > >>>series.asfreq('A-MAR')

> Well, as we don't like an 'origin' to have part of our proposal, you
> won't be able to do exactly that with the proposed plain dtype.

That's what I was afraid of. Oh well, I'm sure we'll come with a way...

Looking forward to reading the third version !


More information about the Numpy-discussion mailing list