Magic should probably be avoided here, so I'm also -0.5 on using `.squeeze()`. However, if the code would fail for e.g. a (N, M, 0) array or any permutation thereof, this should probably be checked and an exception raised. I haven't tested this case.