@docfiller
def uniform_filter(input, size=3, output=None, mode='reflect', cval=0.0, origin=0):
 input = numpy.asarray(input)
 (output, return_value) = _ni_support._get_output(output, input)
 sizes = _ni_support._normalize_sequence(size, input.ndim)
 origins = _ni_support._normalize_sequence(origin, input.ndim)
 modes = _ni_support._normalize_sequence(mode, input.ndim)
 axes = list(range(input.ndim))
 axes = [(axes[ii], sizes[ii], origins[ii], modes[ii]) for ii in range(len(axes)) if (sizes[ii] > 1)]
 if (len(axes) > 0):
  for (axis, size, origin, mode) in axes:
   uniform_filter1d(input, int(size), axis, output, mode, cval, origin)
   input = output
 else:
  output[...] = input[...]
 return return_value

@ docfiller def uniform_filter ( input , size = 3 , output = None , mode = 'reflect' , cval = 0.0 , origin = 0 ) : input = numpy . asarray ( input ) ( output , return_value ) = _ni_support . _get_output ( output , input ) sizes = _ni_support . _normalize_sequence ( size , input . ndim ) origins = _ni_support . _normalize_sequence ( origin , input . ndim ) modes = _ni_support . _normalize_sequence ( mode , input . ndim ) axes = list ( range ( input . ndim ) ) axes = [ ( axes [ ii ] , sizes [ ii ] , origins [ ii ] , modes [ ii ] ) for ii in range ( len ( axes ) ) if ( sizes [ ii ] > 1 ) ] if ( len ( axes ) > 0 ) : for ( axis , size , origin , mode ) in axes : uniform_filter1d ( input , int ( size ) , axis , output , mode , cval , origin ) input = output else : output [ ... ] = input [ ... ] return return_value
multi-dimensional uniform filter .