With older versions of each timedelta rejects the data type. Maybe
that's a good resolution?
$ /usr/local/bin/python2.4
Python 2.4.2 (#2, Jul 7 2006, 10:20:47)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.version.version
'0.9.8'
>>> from numpy import int32
>>> from datetime import timedelta
>>> assert timedelta(seconds = 36) == timedelta(seconds = int32(36))
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported type for timedelta seconds component: int32scalar
>>> |