We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87bc8b5 commit 1aaa1fdCopy full SHA for 1aaa1fd
array_api_tests/test_signatures.py
@@ -135,7 +135,7 @@ def test_function_positional_args(name):
135
# written in pure Python (e.g., it won't work for numpy ufuncs).
136
137
dtype = None
138
- if (name.startswith('__i') and name not in ['__int__', '__invert__']
+ if (name.startswith('__i') and name not in ['__int__', '__invert__', '__index__']
139
or name.startswith('__r') and name != '__rshift__'):
140
n = operators_to_functions[name[:2] + name[3:]]
141
else:
@@ -148,7 +148,7 @@ def test_function_positional_args(name):
148
if array_method(name):
149
if name == '__bool__':
150
_mod = ones((), dtype=bool)
151
- elif name == '__int__':
+ elif name in ['__int__', '__index__']:
152
_mod = ones((), dtype=int64)
153
elif name == '__float__':
154
_mod = ones((), dtype=float64)
0 commit comments