-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manually filter nans prior to fitting.
The lmfit nan_policy needs all the variables to be aligned, but here we are fitting with the "x" grid as the independent variable, but "z" has a different shape. But the nan_policy="omit" option in lmfit simply does a filtering prior to doing any fit, so here we zero out any nans and ensure the weights are 0 for these values.
- Loading branch information
Showing
1 changed file
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters