fix bugs of dot in python

If there are no `transpose()` in `self.theta`, a 

*ValueError: matrices are not aligned*

is occurring. The former test case just ignore this situation.