BUG: remove spurious max/min functions in optimize (ticket #1836)
Merge pull request #415 from dlax/ticket-1836

BUG: remove spurious max/min functions in optimize (ticket #1836)