@docfiller
def prewitt(input, axis=(-1), output=None, mode='reflect', cval=0.0):
 input = numpy.asarray(input)
 axis = _ni_support._check_axis(axis, input.ndim)
 (output, return_value) = _ni_support._get_output(output, input)
 modes = _ni_support._normalize_sequence(mode, input.ndim)
 correlate1d(input, [(-1), 0, 1], axis, output, modes[axis], cval, 0)
 axes = [ii for ii in range(input.ndim) if (ii != axis)]
 for ii in axes:
  correlate1d(output, [1, 1, 1], ii, output, modes[ii], cval, 0)
 return return_value

@ docfiller def prewitt ( input , axis = ( - 1 ) , output = None , mode = 'reflect' , cval = 0.0 ) : input = numpy . asarray ( input ) axis = _ni_support . _check_axis ( axis , input . ndim ) ( output , return_value ) = _ni_support . _get_output ( output , input ) modes = _ni_support . _normalize_sequence ( mode , input . ndim ) correlate1d ( input , [ ( - 1 ) , 0 , 1 ] , axis , output , modes [ axis ] , cval , 0 ) axes = [ ii for ii in range ( input . ndim ) if ( ii != axis ) ] for ii in axes : correlate1d ( output , [ 1 , 1 , 1 ] , ii , output , modes [ ii ] , cval , 0 ) return return_value
calculate a prewitt filter .