[issue31097] itertools.islice not accepting np.int64

2017-08-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: LB, an exception is a graceful shutdown, not a crash. A crash is a seg fault, core dump, or an OS message 'Your app has stopped unexpectedly'. In #30537, the exception was regarded as expected, not a bug, and changing islice to accept np ints was regarded as

[issue31097] itertools.islice not accepting np.int64

2017-08-04 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Using PyNumber_AsSsize_t in itertools.islice type: crash -> behavior ___ Python tracker __

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread LB
LB added the comment: Hi Mark - I've done that here: https://github.com/matplotlib/matplotlib/issues/8973 Liam -- ___ Python tracker ___

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread Mark Dickinson
Mark Dickinson added the comment: That actually looks as though it may be worth a bug report to the matplotlib folks. -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread LB
LB added the comment: Thanks Ray. The use case is here: https://stackoverflow.com/questions/45356718/saving-matplotlib-animation-leads-to-error/45438057#45438057 I'm going to suggest a workaround in matplotlib for the moment. Changing type in this use case shouldn't be a big issue, it only hap

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: See http://bugs.python.org/issue30537 -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs

[issue31097] itertools.islice not accepting np.int64

2017-08-01 Thread LB
New submission from LB: The error arises when this code is used: itertools.islice( [3, 4, 5], np.int64(2) ) but not with this itertools.islice([3,4,5], 2) -- components: Library (Lib) messages: 299617 nosy: braaannigan priority: normal severity: normal status: open title: itertools.isli