[Python-Dev] PEP 564: Add new time functions with nanosecond resolution (original) (raw)
Chris Barker chris.barker at noaa.gov
Mon Oct 23 18:59:20 EDT 2017
- Previous message (by thread): [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
- Next message (by thread): [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Oct 22, 2017 at 1:42 PM, Wes Turner <wes.turner at gmail.com> wrote:
Aligning simulation data in context to other events may be enlightening: is there a good library for handing high precision time units in Python (and/or CFFI)?
Well, numpy's datetime64 can be set to use (almost) whatever unit you want:
https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays. datetime.html#datetime-units
Though it uses a single epoch, which I don't think ever made sense with femtoseconds....
And it has other problems, but it was designed that way, just for the reason.
However, while there has been discussion of improvements, like making the epoch settable, none of them have happened, which makes me think that no one is using it for physics experiments, but rather plain old human calendar time...
-CHB
--
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171023/a6ad4046/attachment.html>
- Previous message (by thread): [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
- Next message (by thread): [Python-Dev] PEP 564: Add new time functions with nanosecond resolution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]