Hi developers,
While porting one of my projects from MATLAB, I encountered the need for a user-defined callback function to be called on each iteration of the least_squares algorithm. Since this feature is currently implemented in other methods (such as optimize.differential_evolution) I implemented the same feature on least_squares.
Please feel free to look at my code (which includes tests for the added feature):
If you think this is worth adding, let me know your thoughts and I can create a pull request.