Original tutorial is not entirely clear on what the jacobian/hessian jacobian/hessianstructure methods should return when providing them as sparse matrices.
I'm not sure if this is the best way to add this information. The structure of the method returns is shown in the example below it, but, as a user, it took me some time to see how best to structure the returns (I also mistakenly tried to use a scipy sparse matrix structure as a return at one point).
This is an edit to the tutorial documentation.
Original tutorial is not entirely clear on what the jacobian/hessian jacobian/hessianstructure methods should return when providing them as sparse matrices.
I'm not sure if this is the best way to add this information. The structure of the method returns is shown in the example below it, but, as a user, it took me some time to see how best to structure the returns (I also mistakenly tried to use a scipy sparse matrix structure as a return at one point).