Skip to content

Conversation

@pavelkomarov
Copy link
Collaborator

@pavelkomarov pavelkomarov commented Aug 15, 2025

moved splinediff, polydiff, and savgoldiff to a new module called polynomial_fit, leaving method stubs behind so everything is backwards compatible. The tests still pass without modification, importing from the old places.

This addresses the lion's share of #138.

…ynomial_fit, leaving method stubs behind so everything is backwards compatible. The tests still pass without modification, importing from the old places.
… changed name of the general finite_difference function to be finitediff so it doesn't collide with the module name, updated the basic usage notebook to be more in line with the new structure, reran everything
evaluate
========

.. currentmodule:: pynumdiff.utils.evaluate
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant with automobile.

from warnings import warn

from pynumdiff.finite_difference import first_order as finite_difference
from pynumdiff.finite_difference import second_order as finite_difference
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A last case where the former-first-order-which-was-actually-second-order was still being imported as first order, which is now properly first order. I haven't been checking on lineardiff as closely, so this slipped through.

scipy.signal.savgol_filter. The Savitzky-Golay is very similar to the sliding polynomial fit,
but slightly noisier, and much faster.
def savgoldiff(*args, **kwargs):
warn("`savgoldiff` has moved to `polynomial_fit.savgoldiff` and will be removed from "
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a common pattern to make the functions still importable from the old place, for backwards compatibility.

@pavelkomarov pavelkomarov merged commit 1e638b1 into master Aug 15, 2025
1 check passed
@pavelkomarov pavelkomarov deleted the make-poly-module branch August 15, 2025 21:03
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