These constants specify what part of the result the convolve and correlate functions of this module return. Each of the following examples assumes that the following code has been executed:
arr = numarray.arange(8)
>>> conv.correlate(arr, [1, 2, 3], mode=conv.FULL) array([ 0, 3, 8, 14, 20, 26, 32, 38, 20, 7])
>>> conv.correlate(arr, [1, 2, 3], mode=conv.PASS) array([ 0, 8, 14, 20, 26, 32, 38, 7])
>>> conv.correlate(arr, [1, 2, 3], mode=conv.SAME) array([ 3, 8, 14, 20, 26, 32, 38, 20])
>>> conv.correlate(arr, [1, 2, 3], mode=conv.VALID) array([ 8, 14, 20, 26, 32, 38])
Send comments to the NumArray community.