So I'm working on a fitting algorithm using the levenberg-marquardt algorithm and I'm a bit stumped as to how to handle fixed parameters. Looking around at other code, like the minpack version of the l-m algorithm, it looks like they are just setting the columns of the jacobian for fixed parameters to be 0.0, which makes sense as they are not changing. $J$ is being computed numerically and is working fine if there are not any fixed parameters. The problem is that I always get a singular uninvertible matrix for $J^TJ$ when I do this, for example something like[[       1005,          0,    -110500], [          0,          0,          0], [    -110500,          0,    3.013e7]]  (The 2nd parameter was held fixed in this case...)Does anyone have some experience with the L-M algo? Any ideas as to how handle the fixed parameters in the jacobian? Should I just create a jacobian that only has the free parameters and patch in the fixed parameters somewhere down the line later? 
Levenberg-marquardt: How to calculate the jacobian with fixed parameters
optimization;jacobian