Error out for 1-dimensional functions

Raise errors when users attempt to solve 1-dimensional optimization problems using the multidimensional interface.