[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2013-07-16 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: NumPy no longer uses the Trac for issues, the tracking has been moved to GitHub. I hope that the problem will be finally solved in NumPy by https://github.com/numpy/numpy/pull/3526 . -- nosy: +zaytsev ___ Python tr

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2012-10-28 Thread Mark Dickinson
Mark Dickinson added the comment: I created http://projects.scipy.org/numpy/ticket/2235 to track this. Closing this issue. -- status: open -> closed ___ Python tracker ___ _

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2012-10-16 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: >From the macro posted earlier: Py##child##ArrType_Type.tp_base = &Py##parent2##ArrType_Type; tp_base is *not* PyInt_Type, so I was wrong when I said that the dominant base was int. This is wrong IMO: tp_base should be int, for the type to be correctly

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2012-10-16 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2012-10-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is more than 6 months old with no activity. -- nosy: +serhiy.storchaka status: pending -> open ___ Python tracker ___ __

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Travis, feel free to close this without further action or use the information here to open a numpy issue. -- assignee: belopolsky -> teoliphant status: open -> pending ___ Python tracker

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-08-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Terry, Realistically, though, if you close this issue it is virtually guaranteed that not further action will be taken. I have not been involved with numpy for a couple of years now, so it would take me some time to find their tracker and restore my c

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: A link can be added at any time. Closing does nothing except remove an issue from searches of open issues. Please close this or allow me to. There is a cost to keeping things like this open -- the puzzlement of anyone reading it and the time cost to triage ma

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-08-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is clearly an invalid issue for python, but I wanted to keep it open until I or someone else gets a chance to report it to numpy project. I was hoping to close this with a link to numpy tracker. -- ___

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Inconsistent headers ;-) Should this be closed as invalid and superceded, or open without resolution? I cannot tell from discussion; one of you please choose. -- nosy: +terry.reedy versions: -Python 2.5, Python 2.6

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: multiple inheritance should not be a problem: there can be only one "dominant base", which is 'int' in this case. someone with a debugger should step into this call to PyType_Ready() and see why it does not set the flag correctly (at the end of inherit_s

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-19 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Does Numpy correctly call PyType_Ready()? As far as I can tell, it does: #define DUAL_INHERIT(child, parent1, parent2) \ Py##child##ArrType_Type.tp_base = &Py##parent2##ArrType_Type; \ Py##child##ArrType_Type.tp

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Py_TPFLAGS_INT_SUBCLASS is an implementation detail, and extension modules should not have to be aware of it. Does Numpy correctly call PyType_Ready()? -- nosy: +amaury.forgeotdarc status: pending -> open ___

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-19 Thread Alexander Belopolsky
Alexander Belopolsky 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 ... >>> fo

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-07-05 Thread Alexander Belopolsky
Alexander Belopolsky 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

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2010-05-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2009-05-18 Thread engelbert gruber
engelbert gruber added the comment: testing with 2.6 and numpy 1.3 already :: timedelta(seconds = int32(36)) TypeError: unsupported type for timedelta seconds component: numpy.int32 But not if I apply a change to numpy to fix issue2263 then ``timedelta(days = int32(36))`` and ``timedel

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2009-03-11 Thread David W. Lambert
David W. Lambert added the comment: 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 "licens

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2009-03-11 Thread Barron Henderson
Changes by Barron Henderson : -- components: +Library (Lib) versions: +Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2009-03-11 Thread Barron Henderson
New submission from Barron Henderson : Initializing a timedelta object with numpy.int32 arguments give mixed results; it fails for days keyword, gives bad results for minutes, and give correct results for seconds/microseconds. Failure confirmed on Linux i686 (Py 2.5.2; numpy 1.2.1) and OS X 10.5