draw_utils.py
def blur(a):
    """ experimental, blurs an numpy array a """
    kernel = np.array([[1.0,2.0,1.0], [2.0,4.0,2.0], [1.0,2.0,1.0]])
    kernel = kernel / np.sum(kernel)
    arraylist = []
    for y in range(3):
        temparray = np.copy(a)
        temparray = np.roll(temparray, y - 1, axis=0)
        for x in range(3):
            temparray_X = np.copy(temparray)
            temparray_X = np.roll(temparray_X, x - 1, axis=1)*kernel[y,x]
            arraylist.append(temparray_X)
    arraylist = np.array(arraylist)
    arraylist_sum = np.sum(arraylist, axis=0)
    return arraylist_sum
 experimental, blurs an numpy array a 
experimental, blurs an numpy array a
experimental blurs an numpy array a
def blur(a):
    kernel = np.array([[1.0,2.0,1.0], [2.0,4.0,2.0], [1.0,2.0,1.0]])
    kernel = kernel / np.sum(kernel)
    arraylist = []
    for y in range(3):
        temparray = np.copy(a)
        temparray = np.roll(temparray, y - 1, axis=0)
        for x in range(3):
            temparray_X = np.copy(temparray)
            temparray_X = np.roll(temparray_X, x - 1, axis=1)*kernel[y,x]
            arraylist.append(temparray_X)
    arraylist = np.array(arraylist)
    arraylist_sum = np.sum(arraylist, axis=0)
    return arraylist_sum
def blur ( a ) : kernel = np . array ( [ [ 1.0 , 2.0 , 1.0 ] , [ 2.0 , 4.0 , 2.0 ] , [ 1.0 , 2.0 , 1.0 ] ] ) kernel = kernel / np . sum ( kernel ) arraylist = [ ] for y in range ( 3 ) : temparray = np . copy ( a ) temparray = np . roll ( temparray , y - 1 , axis = 0 ) for x in range ( 3 ) : temparray_X = np . copy ( temparray ) temparray_X = np . roll ( temparray_X , x - 1 , axis = 1 ) * kernel [ y , x ] arraylist . append ( temparray_X ) arraylist = np . array ( arraylist ) arraylist_sum = np . sum ( arraylist , axis = 0 ) return arraylist_sum
experimental, blurs an numpy array a
experimental blurs an numpy array a
""" experimental, blurs an numpy array a """
a