Message 110788 - Python tracker (original) (raw)
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 .