This trick could be what you are looking for. It is a kind of simple operator overload.
You can then use something like the suggested Infix class like this:
a = np.random.rand(3,4)
b = np.random.rand(4,3)
x = Infix(lambda x,y: np.dot(x,y))
c = a |x| b