def makeRadialMatrix(matrixSize):
 oneStep = (2.0 / (matrixSize - 1))
 (xx, yy) = (numpy.mgrid[0:(2 + oneStep):oneStep, 0:(2 + oneStep):oneStep] - 1.0)
 rad = numpy.sqrt(((xx ** 2) + (yy ** 2)))
 return rad

def makeRadialMatrix ( matrixSize ) : oneStep = ( 2.0 / ( matrixSize - 1 ) ) ( xx , yy ) = ( numpy . mgrid [ 0 : ( 2 + oneStep ) : oneStep , 0 : ( 2 + oneStep ) : oneStep ] - 1.0 ) rad = numpy . sqrt ( ( ( xx ** 2 ) + ( yy ** 2 ) ) ) return rad
generate a square matrix where each element val is its distance from the centre of the matrix .