Skip to content

Fix polyfit NameError when Numba is not enabled - #505

Open
wavebyrd wants to merge 1 commit into
FinancePy-Org:masterfrom
wavebyrd:fix/polyfit-numpy-eval
Open

wavebyrd wants to merge 1 commit into
FinancePy-Org:masterfrom
wavebyrd:fix/polyfit-numpy-eval

Conversation

@wavebyrd

@wavebyrd wavebyrd commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

With the default FINANCEPY_USE_NUMBA unset, the first call to fit_poly or eval_polynomial fails:

>>> fit_poly(np.array([0.0, 1.0, 2.0]), np.array([1.0, 3.0, 5.0]), 1)
NameError: name '_eval_poly_numpy' is not defined

_ensure_impls referred to _eval_poly_numpy, but the NumPy function is named _eval_polynomial_numpy. Added tests/unit/test_polyfit.py; it fails on master and the full unit suite passes with the fix (2153 passed).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant