The question should be pretty simple, but it turns out that there's more to it with respect to what I initially expected.
Starting from the definition of the gate $Y = \begin{bmatrix} 0 & -i \\ i & 0 \end{bmatrix}$, Wikipedia states that the eigenvectors are $$\lambda_{+1} = \frac{1}{\sqrt{2}}\begin{bmatrix}1\\i\end{bmatrix}=: |i\rangle, \lambda_{-1} = \frac{1}{\sqrt{2}}\begin{bmatrix}1\\-i\end{bmatrix} =: |-i\rangle$$
So, I should be able to derive the matrix Pauli-Y as
$$Y = (+1) |i\rangle \langle i| + (-1) |-i\rangle \langle -i| = \begin{bmatrix} 0 & i \\ i & 0 \end{bmatrix}$$
which is clearly different from the first matrix.
numpy
, instead, gives as eigenvectors
$$\lambda_{+1} = \frac{1}{\sqrt{2}}\begin{bmatrix}-i\\1\end{bmatrix}=: |i\rangle, \lambda_{-1} = \frac{1}{\sqrt{2}}\begin{bmatrix}1\\-i\end{bmatrix} =: |-i\rangle$$
which, by using the previous formula, returns a value for the Pauli Y gate equal to
$$Y = \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}$$
which is even stranger.
So, what am I doing wrong? Is it possible to uniquely define the eigenvectors?