[Numpy-discussion] Datetime again

Charles R Harris charlesr.harris at gmail.com
Wed Jan 28 23:29:27 EST 2015


On Wed, Jan 28, 2015 at 6:13 PM, Chris Barker <chris.barker at noaa.gov> wrote:

> Sorry not to notice this for a while -- I've been distracted by
> python-ideas. (Nathaniel knows what I'm talking about ;-) )
>
> I do like the idea of prototyping some DateTime stuff -- it really  isn't
> clear what's needed or how to do it at this point. Though we did more or
> less settle on a reasonable minimum set last summer at SciPy (shame on me
> for not getting that written up properly!)
>
> Chuck -- what have you got in mind for new functionality here? I tend to
> agree with Nathaniel that a ndarray subclass is less than ideal -- they
> tend to get ugly fast. But maybe that is the only way to do anything in
> Python, short of a major refactor to be able to write a dtype in Python --
> which would be great, but sure sounds like a major project to me.
>

I was mostly thinking of implementing a Blaze compatible API without having
to rewrite the numpy datetime stuff. But also, I thought it might be an
easy way to solve some of our problems, or at least experiment.


>
> And as for " The 64 bits of long long really isn't enough and leads to
> all sorts of compromises". not long enough for what? I've always thought
> that what we need is the ability to set the epoch. Does anyone ever need
> picoseconds since 100 years ago? And if they did, we'd be in a heck of a
> mess with leap seconds and all that anyway.
>

I was thinking elapsed time. Nanoseconds can be rather crude for that
depending on the measurement. Of course, such short times aren't going to
come from the system clock, but data collected in other ways, interference
between light pulses over microscopic distances for instance. Such data is
likely acquired as, or computed, from simple numbers with a unit, which
gets us back to the numpy version. But that complicates the heck out of
things when you want to start adding times in different units.

<snip>

Chuck

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150128/e4d4fdf4/attachment.html>


More information about the NumPy-Discussion mailing list