I was planning to teach np.einsum
to colleagues, by hoping to show how it would be reduced to multiplications and summations.
So, instead of numerical data, I thought to use alphabet chars. in the arrays.
Say, we have A (2X2) as [['a', 'b'], ['c', 'd']] and B (2X1) as [['e'], ['f']]
We could use einsum to create a matrix C, say like: np.einsum('ab , bc -> ac', A, B)
.
What I'd like to see is: it return the computation graph: something like: a*c + ..., etc.
Ofcourse, np.einsum
expects numerical data and would give an error if given the above code to run.