MAINT: Use numpy testing method instead of assertTrue.

So that when the test fails, the comparison is in a more readable
format.