[Numpy-discussion] fixing up datetime

Mark Wiebe mwwiebe at gmail.com
Mon Jun 6 15:46:25 EDT 2011


On Mon, Jun 6, 2011 at 2:31 PM, Mark Wiebe <mwwiebe at gmail.com> wrote:

> On Mon, Jun 6, 2011 at 1:33 PM, Christopher Barker <Chris.Barker at noaa.gov>wrote:
>
>> <snip>
>>
> This is even self inconsistent:
>>
>> 1Y == 365D
>>
>> 1Y == 12M == 12 * 30D == 360D
>>
>> 1Y == 12M == 12 * 4W == 12 * 4 * 7D == 336D
>>
>> 1Y == 52W == 52 * 7D == 364D
>>
>> Is it not clear from this what a mess of mis-interpretation might result
>> from all that?
>>
>
> This part of the code is used for mapping metadata like [Y/4] -> [3M], or
> [Y/26] -> [2W]. I agree that this '/' operator in the unit metadata is
> weird, and wouldn't object to removing it.
>

I'd be happy to remove the multiplier before the unit name too. The NEP
gives a rationale mentioning C#'s tick unit being 100ns, but I don't see
that or the other reasons providing a good explanation for it.

-Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110606/9d0164c3/attachment.html>


More information about the NumPy-Discussion mailing list