Fix swap test for size 1 inputs.
The swap of a matrix and its first row actually passes in this case, causing the assertion test to fail sporadically.
The swap of a matrix and its first row actually passes in this case, causing the assertion test to fail sporadically.