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

Francesc Alted falted@pytables....
Fri Jul 11 13:14:01 CDT 2008

A Friday 11 July 2008, Jon Wright escrigué:
> Hello,
> Nice idea - please can you make it work with matplotlib's time/date
> stuff too?

Hmmm, following the matplotlib docstrings:

datetime objects are converted to floating point numbers
which represent the number of days since 0001-01-01 UTC

So it is using something similar to the ``timefloat64`` in our proposal, 
but with a different scale (it is counting days instead of 
microseconds) and a different epoch (0001-01-01 UTC instead of 
1970-01-01 UTC).

So, it seems that setters/getters for matplotlib datetime could be 
supported, maybe at the risk of loosing precision.  We should study 
this more carefully, but I suppose that if there is interest enough 
that could be implemented, yes.

Thanks for pointing out this,

Francesc Alted

More information about the Numpy-discussion mailing list