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

2011-07-26 Thread Stéfan van der Walt
On Mon, Jul 25, 2011 at 2:29 PM, Charles R Harris charlesr.har...@gmail.com wrote: Why?  Users can simply do import numpy.io as npyio ? It caused problems with 2to3 for one thing because it was getting imported as io in the package. It is just a bad idea to shadow python modules and best

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

2011-07-25 Thread Stéfan van der Walt
Hey all, On Tue, Jun 14, 2011 at 4:34 PM, Mark Wiebe mwwi...@gmail.com wrote: These functions are now fully implemented and documented. As always, code reviews are welcome here: https://github.com/numpy/numpy/pull/87 I haven't been keeping up with the datetime developments, but I noticed the

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

2011-07-25 Thread Mark Wiebe
2011/7/25 Stéfan van der Walt ste...@sun.ac.za Hey all, On Tue, Jun 14, 2011 at 4:34 PM, Mark Wiebe mwwi...@gmail.com wrote: These functions are now fully implemented and documented. As always, code reviews are welcome here: https://github.com/numpy/numpy/pull/87 I haven't been keeping

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

2011-07-25 Thread Stéfan van der Walt
On Mon, Jul 25, 2011 at 12:35 PM, Mark Wiebe mwwi...@gmail.com wrote: I'm trying to make things fit into the existing system as naturally as possible. The discussion you're talking about ideally should have resulted in some guideline documentation about namespaces, but I don't recall seeing

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

2011-07-25 Thread Mark Wiebe
2011/7/25 Stéfan van der Walt ste...@sun.ac.za On Mon, Jul 25, 2011 at 12:35 PM, Mark Wiebe mwwi...@gmail.com wrote: I'm trying to make things fit into the existing system as naturally as possible. The discussion you're talking about ideally should have resulted in some guideline

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

2011-07-25 Thread Charles R Harris
2011/7/25 Stéfan van der Walt ste...@sun.ac.za Hey all, On Tue, Jun 14, 2011 at 4:34 PM, Mark Wiebe mwwi...@gmail.com wrote: These functions are now fully implemented and documented. As always, code reviews are welcome here: https://github.com/numpy/numpy/pull/87 I haven't been keeping

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

2011-07-25 Thread Stéfan van der Walt
On Mon, Jul 25, 2011 at 1:02 PM, Mark Wiebe mwwi...@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).

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

2011-07-25 Thread Mark Wiebe
2011/7/25 Stéfan van der Walt ste...@sun.ac.za On Mon, Jul 25, 2011 at 1:02 PM, Mark Wiebe mwwi...@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

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

2011-07-25 Thread Gael Varoquaux
On Mon, Jul 25, 2011 at 03:52:48PM -0500, Mark Wiebe wrote: Can't use numpy.datetime, since that conflicts with Python's datetime library, especially in pylab. I don't understand that: isn't the point of namespaces to avoid those naming conflicts. To me that's just like saying that

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

2011-07-25 Thread Charles R Harris
On Mon, Jul 25, 2011 at 3:00 PM, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Mon, Jul 25, 2011 at 03:52:48PM -0500, Mark Wiebe wrote: Can't use numpy.datetime, since that conflicts with Python's datetime library, especially in pylab. I don't understand that: isn't the

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

2011-07-25 Thread Stéfan van der Walt
On Mon, Jul 25, 2011 at 2:11 PM, Charles R Harris charlesr.har...@gmail.com wrote: It's just asking for import problems and general confusion to shadow a Python module, that's why we renamed io to npyio. Why? Users can simply do import numpy.io as npyio ? Stéfan

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

2011-07-25 Thread Stéfan van der Walt
On Mon, Jul 25, 2011 at 1:52 PM, Mark Wiebe mwwi...@gmail.com wrote: Can't use numpy.datetime, since that conflicts with Python's datetime library, especially in pylab. We're allowed to name the modules under numpy whatever we like--people know that doing from numpy import * can (and already

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

2011-07-25 Thread Benjamin Root
On Monday, July 25, 2011, Gael Varoquaux gael.varoqu...@normalesup.org wrote: On Mon, Jul 25, 2011 at 03:52:48PM -0500, Mark Wiebe wrote: Can't use numpy.datetime, since that conflicts with Python's datetime library, especially in pylab. I don't understand that: isn't the point of

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

2011-07-25 Thread Skipper Seabold
2011/7/25 Stéfan van der Walt ste...@sun.ac.za: On Mon, Jul 25, 2011 at 2:11 PM, Charles R Harris charlesr.har...@gmail.com wrote: It's just asking for import problems and general confusion to shadow a Python module, that's why we renamed io to npyio. Why?  Users can simply do import

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

2011-07-25 Thread Charles R Harris
2011/7/25 Stéfan van der Walt ste...@sun.ac.za On Mon, Jul 25, 2011 at 2:11 PM, Charles R Harris charlesr.har...@gmail.com wrote: It's just asking for import problems and general confusion to shadow a Python module, that's why we renamed io to npyio. Why? Users can simply do import

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

2011-06-17 Thread Mark Wiebe
On Thu, Jun 16, 2011 at 8:18 PM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: On 17.06.2011, at 2:02AM, Mark Wiebe wrote: ok, that was a lengthy hunt, but it's in printing the string in make_iso_8601_date: tmplen = snprintf(substr, sublen, %04 NPY_INT64_FMT, dts-year);

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

2011-06-17 Thread Derek Homeier
On 17.06.2011, at 8:05PM, Mark Wiebe wrote: On Thu, Jun 16, 2011 at 8:18 PM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: On 17.06.2011, at 2:02AM, Mark Wiebe wrote: ok, that was a lengthy hunt, but it's in printing the string in make_iso_8601_date: tmplen =

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

2011-06-17 Thread Mark Wiebe
On Fri, Jun 17, 2011 at 2:46 PM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: On 17.06.2011, at 8:05PM, Mark Wiebe wrote: On Thu, Jun 16, 2011 at 8:18 PM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: On 17.06.2011, at 2:02AM, Mark Wiebe wrote: ok, that was

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

2011-06-16 Thread Mark Wiebe
On Wed, Jun 15, 2011 at 5:16 PM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: On 15.06.2011, at 1:34AM, Mark Wiebe wrote: These functions are now fully implemented and documented. As always, code reviews are welcome here: https://github.com/numpy/numpy/pull/87 and for

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

2011-06-16 Thread Mark Wiebe
I've received some good feedback from Chuck and Ralf on the code and documentation, respectively, and build testing with proposed fixes for issues from the previous merge from Derek. I believe the current set of changes are in good shape to merge, so would like to proceed with that later today.

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

2011-06-16 Thread Charles R Harris
On Thu, Jun 16, 2011 at 2:00 PM, Mark Wiebe mwwi...@gmail.com wrote: I've received some good feedback from Chuck and Ralf on the code and documentation, respectively, and build testing with proposed fixes for issues from the previous merge from Derek. I believe the current set of changes are

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

2011-06-16 Thread Derek Homeier
Hi Mark, On 16.06.2011, at 5:40PM, Mark Wiebe wrote: np.datetime64('2011-06-16 02:03:04Z', 'D') np.datetime64('-06-16','D') I've tried to track this down in datetime.c, but unsuccessfully so (i.e. I could not connect it to any of the dts-year assignments therein). This is

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

2011-06-16 Thread Mark Wiebe
On Thu, Jun 16, 2011 at 5:52 PM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: Hi Mark, On 16.06.2011, at 5:40PM, Mark Wiebe wrote: np.datetime64('2011-06-16 02:03:04Z', 'D') np.datetime64('-06-16','D') I've tried to track this down in datetime.c, but unsuccessfully

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

2011-06-16 Thread Derek Homeier
On 17.06.2011, at 2:02AM, Mark Wiebe wrote: ok, that was a lengthy hunt, but it's in printing the string in make_iso_8601_date: tmplen = snprintf(substr, sublen, %04 NPY_INT64_FMT, dts-year); fprintf(stderr, printed %d[%d]: dts-year=%lld: %s\n, tmplen, sublen, dts-year, substr);

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

2011-06-15 Thread Derek Homeier
On 15.06.2011, at 1:34AM, Mark Wiebe wrote: These functions are now fully implemented and documented. As always, code reviews are welcome here: https://github.com/numpy/numpy/pull/87 and for those that don't want to dig into review C code, the commit for the documentation is here:

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

2011-06-14 Thread Mark Wiebe
These functions are now fully implemented and documented. As always, code reviews are welcome here: https://github.com/numpy/numpy/pull/87 and for those that don't want to dig into review C code, the commit for the documentation is here: