I'm confused about this whole procedure. Why can't we just do:

```python
perimeter_weights = np.zeros(34, float)
perimeter_weights[[5, 7, 15, 17, 25, 27]] = 1
perimeter_weights[[21, 33]] = sqrt(2)
perimeter_weights[[13, 23]] = (1 + sqrt(2)) / 2
```
?

And anyway, `perimeter_weights_matrix` is a bit of a misnomer, `perimeter_weights_dict` being more accurate.