Is there a built-in version of
sum(A, dims) that automatically squeezes the summed out dimension? Something like:
sumsqueeze(A, dim) = squeeze(sum(A, dim), dim)
Surely, I can just combine 2 functions, but in my use case I generate this code and having it as a single built-in function makes it much easier to optimize it later.