Minor cleanup of test_base.py including changing a few comparison arrays
to test sparse matrix against NumPy matrix.