instead of these four lines, I use

```
d = np.zeros((ng, ng))
d[self._multicomp.pairindices] = d12
```

I think it does the same thing, 
(I checked out your branch for a python version where I only have numpy 1.5.1 without ravel_multi_index)