@@ -118,7 +118,6 @@ def wrapped(*args, **kwds):
118
118
# loop over positional parameters and actual arguments
119
119
lst , dct = [], {}
120
120
for arg , (name , parm ) in zip (args , sig .parameters .items ()):
121
- print (arg , name , parm .annotation )
122
121
lst .append (normalize_this (arg , parm ))
123
122
124
123
# normalize keyword arguments
@@ -129,7 +128,6 @@ def wrapped(*args, **kwds):
129
128
f"{ func .__name__ } () got an unexpected keyword argument '{ name } '."
130
129
)
131
130
132
- print ("kw: " , name , sig .parameters [name ].annotation )
133
131
parm = sig .parameters [name ]
134
132
dct [name ] = normalize_this (arg , parm )
135
133
@@ -144,19 +142,6 @@ def wrapped(*args, **kwds):
144
142
f"{ func .__name__ } () takes { len (ba .args )} positional argument but { len (args )} were given."
145
143
)
146
144
147
- # TODO:
148
- # 1. [LOOKS OK] kw-only parameters : see vstack
149
- # 2. [LOOKS OK] extra unknown args -- error out : nonzero([2, 0, 3], oops=42)
150
- # 3. [LOOKS OK] optional (tensor_or_none) : untyped => pass through
151
- # 4. [LOOKS OK] DTypeLike : positional or kw
152
- # 5. axes : live in _impl or in types? several ways of handling them
153
- # 6. [OK, NOT HERE] keepdims : peel off, postprocess
154
- # 7. OutLike : normal & keyword-only, peel off, postprocess
155
- # 8. [LOOKS OK] *args
156
- # 9. [LOOKS OK] consolidate normalizations (_funcs, _wrapper)
157
- # 10. [LOOKS OK] consolidate decorators (_{unary,binary}_ufuncs)
158
- # 11. out= arg : validate it's an ndarray
159
-
160
145
# finally, pass normalized arguments through
161
146
result = func (* ba .args , ** ba .kwargs )
162
147
return result
0 commit comments