BUG: optimize: fix botched test for scalars

Any row-vector or other ndarray with shape[0] == 1 was passed through.
Lars Buitinck a écrit :
> Reverted because it doesn't work on older NumPy. Travis complained.

How is this related to numpy? What exactly did not work (I could not see 
the travis build)?