def to_matrix axis=:horizontal
      if axis == :horizontal
        Matrix[to_a]
      elsif axis == :vertical
        Matrix.columns([to_a])
      else
        raise ArgumentError, "axis should be either :horizontal or :vertical, not #{axis}"
      end
    end
Convert Vector to a horizontal or vertical Ruby Matrix.

== Arguments

* +axis+ - Specify whether you want a *:horizontal* or a *:vertical* matrix.