Make ndim explicit arg for clarity and update docstring
Catch a few more asserts