Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5476>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to