[Numpy-discussion] Merge of date-time branch completed

Charles R Harris charlesr.harris@gmail....
Fri Aug 28 12:39:39 CDT 2009


On Fri, Aug 28, 2009 at 10:47 AM, Travis Oliphant <oliphant@enthought.com>wrote:

>
> Hello folks,
>
> In keeping with the complaint that the pace of NumPy development is too fast, I've finished the merge of the datetime branch to the core.  The trunk builds and all the (previous) tests pass for me.
>
> There are several tasks remaining to be done (the current status is
> definitely still alpha):
>
> * write many unit tests for the desired behavior  (especially for the many
> different kinds of dates supported)
> * finish coercion between datetimes and timedeltas with different
> frequencies
> * improve the ufuncs that support datetime and timedelta so that they look
> at the frequency information.
> * improve the way datetime arrays print
> * probably several other things that I haven't listed
>
> Because of the last point, I will spend my next effort on the work updating
> the proposal to more clearly define some of the expected behaviors and write
> documentation about the expected behavior of the new features.
>
> Help, reviews, criticisms, suggestions, fixes, and patches, are most
> welcome.
>

Umm, replacing the previous code 'M' by '.'  in generate_umath is a bit
obscure. Isn't there a better choice than '.' ?

Please make the multiline comments conform to the standard. I spend a lot of
time fixing these up... And you broke some I already fixed.

Could you break up the long lines in the repeats while you are at it. I'm
doing that too, but every bit helps.

What does UFUNC_OBJ_NEEDS_API do?

Things like

if (fromtype == PyArray_DATETIME || fromtype == PyArray_TIMEDELTA ||
        totype == PyArray_DATETIME || totype == PyArray_TIMEDELTA) {

Are more readable if the trailing || is moved to the head of the line

if (fromtype == PyArray_DATETIME || fromtype == PyArray_TIMEDELTA
        || totype == PyArray_DATETIME || totype == PyArray_TIMEDELTA) {

Hmm, "can also have an additional key called "metadata" which can be any
dictionary", is this new functionality? What does it do?

There are a lot of changes like this : !(loop->obj & UFUNC_OBJ_ISOBJECT).
What is the meaning of UFUNC_OBJ_ISOBJECT and why is this test necessary?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090828/72cc7964/attachment.html 


More information about the NumPy-Discussion mailing list