Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use __call__ install of eval #39

Open
faymanns opened this issue Jan 8, 2025 · 2 comments
Open

Use __call__ install of eval #39

faymanns opened this issue Jan 8, 2025 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@faymanns
Copy link
Member

faymanns commented Jan 8, 2025

Replacing .eval with __call__() would make the API cleaner.
This applies to basis functions as well as splines.

Examples:
Instead of basis_function.eval(t, derivative=1) one could call basis_function(t, derivative=1) directly.
The same applies to splines: spline.eval(t) could be replaced by spline(t).

@faymanns faymanns added the enhancement New feature or request label Jan 8, 2025
@faymanns faymanns added this to the v1.0.0 milestone Jan 8, 2025
@faymanns
Copy link
Member Author

faymanns commented Jan 8, 2025

Before the release of v1 a deprecation warning should be add to .eval.

@faymanns
Copy link
Member Author

  • When we remove .eval we should also stop ignoring A003 (shadowing of a Python builtin) in the ruff configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant