I want a fast method (one line, in python numpy or matlab) to generate a specific symmetric Matrix knowing it dimensions and a parameter `a`.

This matrix should have `1-a` on the diagonal and a elsewhere:

`1-a a a a ....... a
 a 1-a a ........... a
 a a 1-a a a
 a . .
 . . .
 . 1-a a
 a .......................... 1-a`