DownhillSolver::minimize(x) assumes max(step.cols, step.rows) >= 2

just curious, what is your ‘use-case’ here ?

doesn’t the assertion above forbid that case (N<2) ?