Corretly handle cases where both sides do not have the same number of dimensions.
Add a test for the 0d reduction case.