Ensure w is a row vector.

This is causing a few examples to fail.