Miles Cranmer
Miles Cranmer
Some syntax ideas here: https://github.com/mcabbott/Tullio.jl From their README: > Tullio is a very flexible einsum macro. It understands many array operations written in index notation -- not just matrix multiplication...
+1 to this! My code right now is a mix of einops and torch.einsum, but I think it would be very nice/consistent if it was all the same syntax through...
One useful feature not found in existing libraries could be a combined reshape->einsum represented as a single einops expression, like so: ``` einops.sum(x, y, '(i j), i j -> i')...
Would you be open to a functional version @arogozhnikov? I can help add it but I want to confirm your approval first.
I think that syntax would be the desired style. It would also be nice to have `rearrange` built-in as a preprocessing step, so that one could do things like: ```python...
PR ready for comments! https://github.com/arogozhnikov/einops/pull/197
Any opinions on syntax? We are discussing the following options in the PR. The following compares `reduce` and `einsum` syntax: 1. ```python y = reduce(x, "i j -> i") y...
Pinging this thread - let me know of any other opinions. I'll adapt the PR to use (2) otherwise.
Up to you, I am happy to implement any option. To get 2 working with type hints, would the following be an option? ```python @typing.overload def einsum(tensor: Tensor, pattern: str)...
Good point, I didn't realize this aspect about how compilation libraries work. Will think about this more...