BUG: solve issue #2649.

The issue is similar to ticket #473(http://mail.scipy.org/pipermail/numpy-tickets/2007-March/000773.html), multipliaction of a matrix and a
column-vector returns a row-vector. That solution is to convert 1d
array, list, tuple to matrix before multiplying. What causes #2649 is that
matrix will use dot function which is inherited from ndarray. My solution is
to use __mul__ function instead. It will throw an error when user try to
multiply a sqaure matrix and a 1d array. Test on Linux is done.