@@ -45,7 +45,7 @@ def clip(
45
45
# np.clip requires both a_min and a_max not None, while ndarray.clip allows
46
46
# one of them to be None. Follow the more lax version.
47
47
result = _impl .clip (a , min , max )
48
- return _helpers . result_or_out ( result , out )
48
+ return result
49
49
50
50
51
51
@normalizer
@@ -80,7 +80,7 @@ def trace(
80
80
out : Optional [NDArray ] = None ,
81
81
):
82
82
result = _impl .trace (a , offset , axis1 , axis2 , dtype )
83
- return _helpers . result_or_out ( result , out )
83
+ return result
84
84
85
85
86
86
@normalizer
@@ -135,7 +135,7 @@ def vdot(a: ArrayLike, b: ArrayLike, /):
135
135
@normalizer
136
136
def dot (a : ArrayLike , b : ArrayLike , out : Optional [NDArray ] = None ):
137
137
result = _impl .dot (a , b )
138
- return _helpers . result_or_out ( result , out )
138
+ return result
139
139
140
140
141
141
# ### sort and partition ###
@@ -234,7 +234,7 @@ def imag(a: ArrayLike):
234
234
@normalizer
235
235
def round_ (a : ArrayLike , decimals = 0 , out : Optional [NDArray ] = None ):
236
236
result = _impl .round (a , decimals )
237
- return _helpers . result_or_out ( result , out )
237
+ return result
238
238
239
239
240
240
around = round_
@@ -257,7 +257,7 @@ def sum(
257
257
result = _impl .sum (
258
258
a , axis = axis , dtype = dtype , initial = initial , where = where , keepdims = keepdims
259
259
)
260
- return _helpers . result_or_out ( result , out )
260
+ return result
261
261
262
262
263
263
@normalizer
@@ -273,7 +273,7 @@ def prod(
273
273
result = _impl .prod (
274
274
a , axis = axis , dtype = dtype , initial = initial , where = where , keepdims = keepdims
275
275
)
276
- return _helpers . result_or_out ( result , out )
276
+ return result
277
277
278
278
279
279
product = prod
@@ -290,7 +290,7 @@ def mean(
290
290
where = NoValue ,
291
291
):
292
292
result = _impl .mean (a , axis = axis , dtype = dtype , where = NoValue , keepdims = keepdims )
293
- return _helpers . result_or_out ( result , out )
293
+ return result
294
294
295
295
296
296
@normalizer
@@ -307,7 +307,7 @@ def var(
307
307
result = _impl .var (
308
308
a , axis = axis , dtype = dtype , ddof = ddof , where = where , keepdims = keepdims
309
309
)
310
- return _helpers . result_or_out ( result , out )
310
+ return result
311
311
312
312
313
313
@normalizer
@@ -324,7 +324,7 @@ def std(
324
324
result = _impl .std (
325
325
a , axis = axis , dtype = dtype , ddof = ddof , where = where , keepdims = keepdims
326
326
)
327
- return _helpers . result_or_out ( result , out )
327
+ return result
328
328
329
329
330
330
@normalizer
@@ -336,7 +336,7 @@ def argmin(
336
336
keepdims = NoValue ,
337
337
):
338
338
result = _impl .argmin (a , axis = axis , keepdims = keepdims )
339
- return _helpers . result_or_out ( result , out )
339
+ return result
340
340
341
341
342
342
@normalizer
@@ -348,7 +348,7 @@ def argmax(
348
348
keepdims = NoValue ,
349
349
):
350
350
result = _impl .argmax (a , axis = axis , keepdims = keepdims )
351
- return _helpers . result_or_out ( result , out )
351
+ return result
352
352
353
353
354
354
@normalizer
@@ -361,7 +361,7 @@ def amax(
361
361
where = NoValue ,
362
362
):
363
363
result = _impl .max (a , axis = axis , initial = initial , where = where , keepdims = keepdims )
364
- return _helpers . result_or_out ( result , out )
364
+ return result
365
365
366
366
367
367
max = amax
@@ -377,7 +377,7 @@ def amin(
377
377
where = NoValue ,
378
378
):
379
379
result = _impl .min (a , axis = axis , initial = initial , where = where , keepdims = keepdims )
380
- return _helpers . result_or_out ( result , out )
380
+ return result
381
381
382
382
383
383
min = amin
@@ -388,7 +388,7 @@ def ptp(
388
388
a : ArrayLike , axis : AxisLike = None , out : Optional [NDArray ] = None , keepdims = NoValue
389
389
):
390
390
result = _impl .ptp (a , axis = axis , keepdims = keepdims )
391
- return _helpers . result_or_out ( result , out )
391
+ return result
392
392
393
393
394
394
@normalizer
@@ -401,7 +401,7 @@ def all(
401
401
where = NoValue ,
402
402
):
403
403
result = _impl .all (a , axis = axis , where = where , keepdims = keepdims )
404
- return _helpers . result_or_out ( result , out )
404
+ return result
405
405
406
406
407
407
@normalizer
@@ -414,7 +414,7 @@ def any(
414
414
where = NoValue ,
415
415
):
416
416
result = _impl .any (a , axis = axis , where = where , keepdims = keepdims )
417
- return _helpers . result_or_out ( result , out )
417
+ return result
418
418
419
419
420
420
@normalizer
@@ -431,7 +431,7 @@ def cumsum(
431
431
out : Optional [NDArray ] = None ,
432
432
):
433
433
result = _impl .cumsum (a , axis = axis , dtype = dtype )
434
- return _helpers . result_or_out ( result , out )
434
+ return result
435
435
436
436
437
437
@normalizer
@@ -442,13 +442,13 @@ def cumprod(
442
442
out : Optional [NDArray ] = None ,
443
443
):
444
444
result = _impl .cumprod (a , axis = axis , dtype = dtype )
445
- return _helpers . result_or_out ( result , out )
445
+ return result
446
446
447
447
448
448
cumproduct = cumprod
449
449
450
450
451
- @normalizer
451
+ @normalizer ( promote_scalar_result = True )
452
452
def quantile (
453
453
a : ArrayLike ,
454
454
q : ArrayLike ,
@@ -469,10 +469,10 @@ def quantile(
469
469
keepdims = keepdims ,
470
470
interpolation = interpolation ,
471
471
)
472
- return _helpers . result_or_out ( result , out , promote_scalar = True )
472
+ return result
473
473
474
474
475
- @normalizer
475
+ @normalizer ( promote_scalar_result = True )
476
476
def percentile (
477
477
a : ArrayLike ,
478
478
q : ArrayLike ,
@@ -493,7 +493,7 @@ def percentile(
493
493
keepdims = keepdims ,
494
494
interpolation = interpolation ,
495
495
)
496
- return _helpers . result_or_out ( result , out , promote_scalar = True )
496
+ return result
497
497
498
498
499
499
def median (
0 commit comments