8000 Install __iter__ instead of a slot · mattip/numpy@6b1ec37 · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 6b1ec37

Browse files
committed
Install __iter__ instead of a slot
1 parent 35a0b2d commit 6b1ec37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

numpy/core/src/multiarray/arrayobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2249,7 +2249,8 @@ static HPy array_new_impl(HPyContext *ctx, HPy h_subtype, const HPy *args_h,
22492249
}
22502250

22512251

2252-
HPyDef_SLOT(array_iter, HPy_tp_iter)
2252+
// HPyDef_SLOT(array_iter, HPy_tp_iter)
2253+
HPyDef_METH(array_iter, "__iter__", HPyFunc_NOARGS)
22532254
static HPy
22542255
array_iter_impl(HPyContext *ctx, HPy h_arr)
22552256
{

0 commit comments

Comments
 (0)
0