Does this matrix have a square root, and what is it? let $$M=\Biggl(\matrix{1&0&1\\0&1&0\\1&0&1}\Biggr)$$
does $M$ have a square root?
I believe that $M$ corresponds to a positive linear transformation, because it is a self-transpose, and has all non negative eigenvalues 2, 0, and 1 (according to numpy.linalg.eig). Because of this it should have a square root,
However, scipy.linalg.sqrtm says that the square root is
$$\Biggl(\matrix{\frac{1}{\sqrt{2}}&0&\frac{1}{\sqrt{2}}\\0&1&0\\\frac{1}{\sqrt{2}}&0&\frac{1}{\sqrt{2}}}\Biggr)$$
when I square that matrix in python, it gives:
$$\Biggl(\matrix{\frac{1}{2}&0&\frac{1}{2}\\0&1&0\\\frac{1}{2}&0&\frac{1}{2}}\Biggr)$$
Is there a bug with my brain, or with numpy/scipy?

Now, I see the problem. In programming languages there are two "squaring" operations on matrices. One squares each individual entry, the other is actual matrix multiplication. 
You squared each individual entry of $M^{1/2} := \begin{bmatrix}\tfrac{1}{\sqrt{2}} & 0 & \tfrac{1}{\sqrt{2}} \\ 0 & 1 & 0 \\ \tfrac{1}{\sqrt{2}} & 0 & \tfrac{1}{\sqrt{2}}\end{bmatrix}$ to get $\begin{bmatrix}\tfrac{1}{2} & 0 & \tfrac{1}{2} \\ 0 & 1 & 0 \\ \tfrac{1}{2} & 0 & \tfrac{1}{2}\end{bmatrix}$. 
If you use matrix multiplication, you'll get $M^{1/2}M^{1/2} = \begin{bmatrix}\tfrac{1}{\sqrt{2}} & 0 & \tfrac{1}{\sqrt{2}} \\ 0 & 1 & 0 \\ \tfrac{1}{\sqrt{2}} & 0 & \tfrac{1}{\sqrt{2}}\end{bmatrix}\begin{bmatrix}\tfrac{1}{\sqrt{2}} & 0 & \tfrac{1}{\sqrt{2}} \\ 0 & 1 & 0 \\ \tfrac{1}{\sqrt{2}} & 0 & \tfrac{1}{\sqrt{2}}\end{bmatrix} = \begin{bmatrix}1 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 1\end{bmatrix} = M$.
