File tree 3 files changed +160
-182
lines changed
3 files changed +160
-182
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ def wrapped(*args, **kwds):
131
131
# 5. axes : live in _impl or in types? several ways of handling them
132
132
# 6. keepdims : peel off, postprocess
133
133
# 7. OutLike : normal & keyword-only, peel off, postprocess
134
- # 8. *args
134
+ # 8. [LOOKS OK] *args
135
135
136
136
# finally, pass normalized arguments through
137
137
result = func (* ba .args , ** ba .kwargs )
@@ -145,7 +145,6 @@ def wrapped(*args, **kwds):
145
145
146
146
@normalizer
147
147
def nonzero (a : ArrayLike ):
148
- # (tensor,) = _helpers.to_tensors(a)
149
148
result = a .nonzero (as_tuple = True )
150
149
return _helpers .tuple_arrays_from (result )
151
150
Original file line number Diff line number Diff line change @@ -470,25 +470,6 @@ def maybe_set_base(tensor, base):
470
470
return ndarray ._from_tensor_and_base (tensor , base )
471
471
472
472
473
- class asarray_replacer :
474
- def __init__ (self , dispatch = "one" ):
475
- if dispatch not in ["one" , "two" ]:
476
- raise ValueError ("ararray_replacer: unknown dispatch %s" % dispatch )
477
- self ._dispatch = dispatch
478
-
479
- def __call__ (self , func ):
480
- if self ._dispatch == "one" :
481
-
482
- @functools .wraps (func )
483
- def wrapped (x , * args , ** kwds ):
484
- x_tensor = asarray (x ).get ()
485
- return asarray (func (x_tensor , * args , ** kwds ))
486
-
487
- return wrapped
488
- else :
489
- raise ValueError
490
-
491
-
492
473
###### dtype routines
493
474
494
475
You can’t perform that action at this time.
0 commit comments