They-matrix [1] is a 3-dimensional numpy.ndarray which has shapefxnxn, where f is frequency axis and n is number of ports.Note that indexing starts at 0, so y11 can be accessed bytaking the slice y[:,0,0].
where $y$ and $x$ are of different size. Is it possible to do a simple operation which will turn $A$ into a matrix function of both $y$ and $x$? I guess I can multiply on the right side with $x^\top$ and divide by the norm to yield the identity-matrix, but is there a smoother way to proceed?
Multiplying both sides by $x^\top$ will not help, in general. The matrix $xx^\top$ is a $2 \times 2$ rank $1$ matrix (in this case, coincidentally equal to $A_2$). It has no inverse. So, while it's true that $A(xx^\top) = yx^\top$, there is no unique way to solve for $A$, as the example shows.
3a8082e126