bundles / numpy latest / numpy / lib / _function_base_impl / _ureduce
function
numpy.lib._function_base_impl:_ureduce
source: build-install/usr/lib/python3.14/site-packages/numpy/lib/_function_base_impl.py :3815
Signature
def _ureduce ( a , func , keepdims = False , ** kwargs ) Summary
Internal Function. Call func with a as first argument swapping the axes to use extended axis on functions that don't support it natively.
Extended Summary
Returns result and a.shape with axis dims set to 1.
Parameters
a: array_likeInput array or object that can be converted to an array.
func: callableReduction function capable of receiving a single axis argument. It is called with
aas first argument followed bykwargs.kwargs: keyword argumentsadditional keyword arguments to pass to
func.
Returns
result: tupleResult of func(a, **kwargs) and a.shape with axis dims set to 1 which can be used to reshape the result to the same shape a ufunc with keepdims=True would produce.
Aliases
-
numpy.lib._function_base_impl._ureduce