Fixed a bug in ompy.library.log_interp1d
#199
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've fixed a minor bug in
ompy.library.log_interp1d
which prevented the user to set thekind
keyword arguments toscipy.interpolate.interp1d
. The default value is now set tokind='linear'
and can be changed by the user.I'm also considering adding a
lin_interp1d
toompy.library
. Mainly since it could complement thelog_interp1d
.Any objections?
One could also redo the two interpolation functions into a single function
interp1d(xx, yy, type='log/lin', **kwargs)
but that would require a little work to properly propagate the change to the entire package, and would not be backwards compatible if any users have used it explicitly. One could preserve the current function as a "legacy" solution with the 'new' as a wrapper:and add a depreciation warning when the legacy versions are used.