I think you should generally not blindly apply the MATLAB
> approach. Python is a more powerful language than MATLAB,
> and support for more than just doubles is one it's
Agreed. That's why we're here, after all.
> How does the datetime module store the values in a datetime
> object? My first inclination would be to follow it's
> approach, but it may not be suited to arrays ( )
From the header of datetime.h
/* Fields are packed into successive bytes, each viewed as unsigned and
* big-endian, unless otherwise noted:
* byte offset
* 0 year 2 bytes, 1-9999
* 2 month 1 byte, 1-12
* 3 day 1 byte, 1-31
* 4 hour 1 byte, 0-23
* 5 minute 1 byte, 0-59
* 6 second 1 byte, 0-59
* 7 usecond 3 bytes, 0-999999
I am concerned about the performance and memory hit of using, for
example, a list of a list of datetime objects rather than a numeric
array of floats. In the float representation, you can efficiently
create a large date range array with, for example, the drange code I
posted. Another concern is implementation: I would have to special
case setting the tick limits and locations, eg calls to set_xlim and
set_xticks, to check for datetime instances. I'm not totally wed to
the float array approach however, and it is possible to handle
datetime conversions as special cases in the axis functions if the
consensus is that this would be better.
These look very nice and their is a good likelihood I'll use both.
DateUtil can extend and improve the date tickers considerably, and the
pytz classes should keep users happy around the world!