Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
As I suspected, datetime not recognizing numpy.int_ as a valid input is a numpy issue. Unlike regular int subclasses, numpy.int_ does not have Py_TPFLAGS_INT_SUBCLASS flag set: >>> numpy.int_.__flags__ & (1<<23) 0 >>> class foo(int): pass ... >>> foo.__flags__ & (1<<23) 8388608 What python can improve in this area is documentation. See issue9307. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> pending superseder: -> Py_TPFLAGS_LONG_SUBCLASS is not documented type: -> behavior versions: +Python 2.7 _______________________________________ 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