[Numpy-discussion] datetime update

Pierre GM pgmdevlist@gmail....
Mon Nov 23 18:53:10 CST 2009


On Nov 23, 2009, at 6:42 PM, Travis Oliphant wrote:
> 
> 
> I've made a few changes to datetime today and spent some time looking over what is there and what remains to be implemented.  

As always, many thanks for your work !!

> Basically, the biggest thing left to do is to implement the low-level casting functions to and from datetime types and other numpy types.  


> In addition, the ufuncs need some auditing to make sure the right thing is being done when mixing different units.  After that, lots and lots of additional tests need to be written.      Once that is done, then most of the features should be available, but I suspect a few lingering issues might crop up and require fixing or fleshing out as well. 
> 
> I was hoping that someone would be able to contribute more tests for datetime.    I will spend some time on the casting functions over the next few weeks and write a few tests.  

Fortunately, the new modifications will make it easier to write such tests... But in any case, we can assume that what is proposed in the NEP should work, right ?




> I also removed numpy.datetime and numpy.timedelta from the namespace (replaced them with numpy.datetime_ and numpy.timedelta_).   These were just short-hand for numpy.datetime64 and numpy.timedelta64 respectively.   Avoiding the collision seemed like a good idea. 
> 
> Right now, what works is "viewing" arrays as datetime data-types and getting and setting date-time arrays using datetime objects.   I would like to improve it so that setting with strings, integers, and other Python objects works as well.    


Did you use any of Marty Fuhry's GSoC work ? What are the potential issues that could prevent an easy integration ?


> Also, adding simple integers works, but 
> 
> Dave C suggested removing the new C-API calls which sounds like a good idea to me for 1.4.0.   Which functions get exported into the C-API for 1.5.0 could then receive some discussion.

Wouldn't it be easier to leave the C-APi as it is now, even for 1.4.0, but not to advertize it before 1.5.0 ?

Thanks again for everything
P.


More information about the NumPy-Discussion mailing list