-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Need to register numpy's datetime64 in the units framework #1097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mdboom, supporting datetime64 looks like a substantial chunk of work to do well--with lots of testing. Ideally, I suspect we would want it to be handled somewhat interchangeably with the regular datetime objects we already support. Given that datetime64 was primitive--perhaps broken--in numpy 1.6, and is marked "experimental" in numpy 1.7, I don't think it should be a blocker for mpl 1.2; I think it would be a better target for 1.3. Your call, though. |
Given that the 1.2 freeze is scheduled for Monday, August 20, I think there's not much chance of it getting in 1.2 without pushing the timeline back. I haven't looked at this issue at all, so have no sense of its scope. @efiring's summary of the status in Numpy suggests that there's no real rush. |
I've spent some time with this -- it looks like the minimal option is to make datetime64 work more-or-less like the datetime support we have now, and assume a minimum resolution of 1s etc. But the right thing to do is to natively support all of the different bases that datetime64 supports without losing resolution. That's going to be considerable effort I think -- I'm somewhat handicapped by not having a good understanding of the units framework and how data flows around through it. I think we put this off in order to do it right. |
On 2012/08/19 7:51 AM, Michael Droettboom wrote:
+1 |
Removed from the 1.2.x milestone. FYI I will be needing to look at datetime handling in the not-too-distant future (at least the next 6 months anyway) to support other calendar types (360 day calendars for instance). |
Just to give this issue a bit of a kick in the pants, here is a prototype as suggested by @agijsberts
It has limitations, but it would be a step up from where we are now. |
For the record, @jorisvandenbossche implemented a similar piece of functionality in pandas: pandas-dev/pandas#8693 |
And for clarity, I did not really implement something new, I only registered the existing pandas machinery also for the But, the pandas implementation can certainly be used as a start / inspiration to implement this in matplotlib (it should be investigated how much of the implementation is pandas specific, but based on the discussion here (pandas-dev/pandas#8614 (comment)) that is maybe not too much). |
To clarify, the implementation currently in pandas only supports |
Closing as I think we should, to first order, delegate all the datetime64 handling to pandas. |
I just remembered that this was a special request by John Hunter back during SciPy 2012 conference. He says that he considers this a release-stopper until we get this added in.
The text was updated successfully, but these errors were encountered: