- basic visual explanations (for kids)
- basic algebra steps (for high school)
- standard explanation (for undergraduate students)
- compact explanation (a reviee for grad students)
The above implementation are polymorphism due to the "reader level of knowledge," but there could be other, e.g. derivatives explained using code like in Sec 4.1 in this calculus tutorial[1]. (Y @ X)[None]
# array([[14, 32, 50]])
but `(Y @ X)[None].T` works as you described: (Y @ X)[None].T
# array([[14],
# [32],
# [50]])
I don't know either RE supposed to or not, though I know np.newaxis is an alias for None. Z = Y @ X
np.stack([Z, Z], axis=1)
# array([[14, 14],
# [32, 32],
# [50, 50]])
with convention that vectors are shape (3,) instead of (3,1). Z = Y @ X[:,np.newaxis]
thought it is arguably more complicated than calling the `.reshape(3,1)` method.