Factor out an assertion method for testing.
Fix astype and add tests.
Remove a skipped test.
Partially fix LocalArray.view().

Raise NotImplemented in a case that didn't work properly.