@docfiller
def generic_filter1d(input, function, filter_size, axis=(-1), output=None, mode='reflect', cval=0.0, origin=0, extra_arguments=(), extra_keywords=None):
 if (extra_keywords is None):
  extra_keywords = {}
 input = numpy.asarray(input)
 if numpy.iscomplexobj(input):
  raise TypeError('Complex type not supported')
 (output, return_value) = _ni_support._get_output(output, input)
 if (filter_size < 1):
  raise RuntimeError('invalid filter size')
 axis = _ni_support._check_axis(axis, input.ndim)
 if ((((filter_size // 2) + origin) < 0) or (((filter_size // 2) + origin) >= filter_size)):
  raise ValueError('invalid origin')
 mode = _ni_support._extend_mode_to_code(mode)
 _nd_image.generic_filter1d(input, function, filter_size, axis, output, mode, cval, origin, extra_arguments, extra_keywords)
 return return_value

@ docfiller def generic_filter1d ( input , function , filter_size , axis = ( - 1 ) , output = None , mode = 'reflect' , cval = 0.0 , origin = 0 , extra_arguments = ( ) , extra_keywords = None ) : if ( extra_keywords is None ) : extra_keywords = { } input = numpy . asarray ( input ) if numpy . iscomplexobj ( input ) : raise TypeError ( 'Complex type not supported' ) ( output , return_value ) = _ni_support . _get_output ( output , input ) if ( filter_size < 1 ) : raise RuntimeError ( 'invalid filter size' ) axis = _ni_support . _check_axis ( axis , input . ndim ) if ( ( ( ( filter_size // 2 ) + origin ) < 0 ) or ( ( ( filter_size // 2 ) + origin ) >= filter_size ) ) : raise ValueError ( 'invalid origin' ) mode = _ni_support . _extend_mode_to_code ( mode ) _nd_image . generic_filter1d ( input , function , filter_size , axis , output , mode , cval , origin , extra_arguments , extra_keywords ) return return_value
calculate a one-dimensional filter along the given axis .