You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can hit this by doing np.range(10).__iter__(). This was added in 3a7a0d2.
For some reason calling src_cycle = cycle(self.pool) in setting up the random.bit_generator is hitting this in PyPy but not in CPython. Maybe cycle is implemented slightly differently in CPython, and avoids calling self.pool.__iter__().
The text was updated successfully, but these errors were encountered:
On CPython, it seems HPyDef_METH(array_iter, "__iter__", HPyFunc_NOARGS) does not push the __dict__ function into the tp_iter slot, so CPython does not hit this problem. Instead, the __new__ function for the c implementation of itertools.cycle will call PySeqIter_New(ndarray), which wraps the ndarray in a new iter object.
Interesting, I thought CPython would also push the __iter__ member back to the tp_iterslot. See update_one_slot.
I guess we need to investigate in the debugger what path CPython takes.
array_iter_impl
->HPySeqIter_New
-> look up__iter__
and call it ->array_iter_impl
.You can hit this by doing
np.range(10).__iter__()
. This was added in 3a7a0d2.For some reason calling
src_cycle = cycle(self.pool)
in setting up therandom.bit_generator
is hitting this in PyPy but not in CPython. Maybecycle
is implemented slightly differently in CPython, and avoids callingself.pool.__iter__()
.The text was updated successfully, but these errors were encountered: