the implementation is overly complex. use the following code after assert:
<pre>
if(m.rows == 1)
   m.copyTo(_step);
else
   transpose(m, _step);
</pre>