I'm trying to iterate through the numpy array and assigning a 0 - 255 value based on the distance to the mouse.  

`WIDTH` and `HEIGHT` are in this case set to 400 and `GRID[]` is a numpy matrix with `WIDTH` and `HEIGHT` dimensions.  

I'm using the `window.set_at()` function to draw each pixel on the screen with the color stored in the numpy matrix, I'm getting about 5 FPS.  

Is there a more efficient way to handle this type of pixel processing, or should I switch to something like c++ & SFML

```
    #update pixels
    for y in range(HEIGHT):
        for x in range(WIDTH):
            #get color based on distance to mouse; 0 -> 255
            mousePosition = pg.mouse.get_pos()
            dx = mousePosition[0] - x
            dy = mousePosition[1] - y
            d = math.sqrt(abs(dx ** 2 + dy ** 2))

            #constraining the distance value between 0 - 255
            c = min(max(d, 0), 255)

            GRID[x,y] = c

    #draw pixels
    for y in range(HEIGHT):
        for x in range(WIDTH):
            c = GRID[x,y]
            window.set_at((x, y), (c, c, c))

```