better encapsulation of test suite for ndarrays, add more tests