Remove assert in production code
assert are removed with compiling to optimized byte code (python -o producing *.pyo files). This caused various protections to be removed.

 assert isinstance -> raise TypeError #5536
 assert *.rank == 0 ->
 assert len(...) == len(...) ->