[Numpy-discussion] code review/build & test for datetime business day API

Mark Wiebe mwwiebe at gmail.com
Mon Jul 25 16:52:48 EDT 2011


2011/7/25 Stéfan van der Walt <stefan at sun.ac.za>

> On Mon, Jul 25, 2011 at 1:02 PM, Mark Wiebe <mwwiebe at gmail.com> wrote:
> >> Probably should have!  Either way, it's something to consider: if we
> >> introduce those functions now, people will start to use them where
> >> they are (np.xyz), introducing another change in usage comes 2.0 (or
> >> 3.0 or whichever).
> >
> > Absolutely, do you have any suggestions about organizing the datetime
> > functionality? It's as good a place as any to try applying a good
> namespace
> > convention.
>
> The first thought that comes to mind is simply to keep them in a
> submodule, so that users can do something like:
>
> from numpy.datetime import some_date_func
>
> That convention should be very easy to support across the
> restructuring.  The important thing then is to document clearly that
> these functions are available.
>

Can't use numpy.datetime, since that conflicts with Python's datetime
library, especially in pylab. Can't use numpy.datetime64, since that's
already the name of the scalar type. I don't like numpy.dt, that name
belongs to a delta t variable in Python. I'm not sure what a good name for
the namespace is, actually.

-Mark



>
> Regards
> Stéfan
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110725/583b7e14/attachment.html>


More information about the NumPy-Discussion mailing list