Note that the suggested change above (making `grid_size` be a `param.Integer`) would make `n` an int. `N` is always an int (I think - right?), so you'd then already be getting integer division here and there'd be no need for the `int()` and `round()`. However, if you are currently passing in float values for `grid_size`, this could result in a change:
```
>>> 10/4
2
>>> int(round(10 / 4.0))
3
```

I'd have to study your code to say what the right thing is (sorry I only have a little time to comment on style issues right now!).