4 ms·
To be honest einsum is the easiest one. You get fine control on which axis matmul to which. But I wish it can do more than matmul. The others are just messy sh
by akasakahakada 2y ago
To be honest einsum is the easiest one. You get fine control on which axis matmul to which. But I wish it can do more than matmul.
The others are just messy shit. Like you got np.abs but no arr.abs, np.unique but no arr.unique. But now you have arr.mean.
Sometimes you got argument name index, sometimes indices, sometimes accept (list, tuple), sometime only tuple.
- samsartor 2y agohttps://github.com/mcabbott/Tullio.jl https://github.com/mcabbott/Tullio.jl is my favorite idea for extending einsum notation to more stuff. Really hope numpy/torch get something comparable!
- enkursigilo 2y agoYeah, Tullio.jl is a great package. Basically, it is just a macro for generating efficient for loops. I guess, it might be hard to achieve similar feature in Python without metaprogramming.