Message109352
This is a bit strange. timedelta is accepting int subclass instances:
>>> class I(int):
... pass
...
>>> timedelta(days = I(36))
datetime.timedelta(36)
but not numpy.unt_:
>>> timedelta(days = int_(36))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported type for timedelta days component: numpy.int64
which is also a subclass of int:
>>> isinstance(int_(36), int)
True
This is probably a numpy quirk rather than python issue, but is probably worth another look. |
|
| Date |
User |
Action |
Args |
| 2010-07-05 20:15:56 | belopolsky | set | recipients:
+ belopolsky, grubert, LambertDW, barronh |
| 2010-07-05 20:15:56 | belopolsky | set | messageid: <[email protected]> |
| 2010-07-05 20:15:54 | belopolsky | link | issue5476 messages |
| 2010-07-05 20:15:54 | belopolsky | create | |
|