<gh_stars>10-100
import numpy
import scipy.signal

def binomialFilter(size):
    ''' returns a vector of binomial coefficients of order (size-1) '''
    if size < 2:
        raise Exception("Error: size argument must be larger than 1")
    
    kernel = numpy.array([[0.5], [0.5]])

    for i in range(0, size-2):
        kernel = scipy.signal.convolve(numpy.array([[0.5], [0.5]]), kernel)

    return numpy.asarray(kernel)

import numpy
import scipy.signal

def binomialFilter(size):
    ''' returns a vector of binomial coefficients of order (size-1) '''
    if size < 2:
        raise Exception("Error: size argument must be larger than 1")
    
    kernel = numpy.array([[0.5], [0.5]])

    for i in range(0, size-2):
        kernel = scipy.signal.convolve(numpy.array([[0.5], [0.5]]), kernel)

    return numpy.asarray(kernel)
returns a vector of binomial coefficients of order (size-1)