@docfiller<EOL>def generic_filter1d(input, function, filter_size, axis=-<NUM_LIT:1>,<EOL>output=None, mode="<STR_LIT>", cval=<NUM_LIT:0.0>, origin=<NUM_LIT:0>,<EOL>extra_arguments=(), extra_keywords = None):
if extra_keywords is None:<EOL><INDENT>extra_keywords = {}<EOL><DEDENT>input = numpy.asarray(input)<EOL>if numpy.iscomplexobj(input):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>output, return_value = _ni_support._get_output(output, input)<EOL>if filter_size < <NUM_LIT:1>:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>axis = _ni_support._check_axis(axis, input.ndim)<EOL>if (filter_size // <NUM_LIT:2> + origin < <NUM_LIT:0>) or (filter_size // <NUM_LIT:2> + origin >=<EOL>filter_size):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>mode = _ni_support._extend_mode_to_code(mode)<EOL>_nd_image.generic_filter1d(input, function, filter_size, axis, output,<EOL>mode, cval, origin, extra_arguments, extra_keywords)<EOL>return return_value<EOL>
Calculate a one-dimensional filter along the given axis.

    `generic_filter1d` iterates over the lines of the array, calling the
    given function at each line. The arguments of the line are the
    input line, and the output line. The input and output lines are 1D
    double arrays.  The input line is extended appropriately according
    to the filter size and origin. The output line must be modified
    in-place with the result.

    Parameters
    ----------
    %(input)s
    function : callable
        Function to apply along given axis.
    filter_size : scalar
        Length of the filter.
    %(axis)s
    %(output)s
    %(mode)s
    %(cval)s
    %(origin)s
    %(extra_arguments)s
    %(extra_keywords)s