<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def CircularMaskGrid(gridSize, diameter=None):
 """ Return a square grid with ones inside and zeros outside a given diameter circle """

    if diameter is None: diameter=gridSize
    return np.less_equal(RadiusGrid(gridSize),diameter/2.0)