Added ndim check to subtensor.

Minor change
I think this should work:
return decl + checkNDim + "{" + get_xview + build_view + finish_view + "}"