On Nov 23, 2009, at 6:53 PM, Pierre GM wrote:

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 ?

Yes, that is correct.

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 ?

Yes, I did actually. His work was quite helpful in converting from date-time objects. The major issues were the approach taken to a few of the functions was not quite right, but quite a bit of the raw code I just used. Marty deserves kudos for his work here. It was very useful and helpful. Please pass that on to him.



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 ?

Not necessarily. My understanding is that we just have to turn-off exposure of the API and leave everything else the same.

-Travis




_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to