Skip to content

Conversation

@jorenham
Copy link
Owner

@jorenham jorenham commented Nov 3, 2025

For either integral/real $n$ and real/complex $z$. For integral $n$ and real $z$, this is implemented in pure-Rust (by me). Otherwise, it wraps hyp2f1 from xsf, exactly like it's done in SciPy.

Towards #144

Copilot AI review requested due to automatic review settings November 3, 2025 03:12
@jorenham jorenham added the enhancement New feature or request label Nov 3, 2025
@jorenham jorenham added this to the 0.3.4 milestone Nov 3, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for evaluating orthogonal polynomials (Jacobi and Legendre) by translating the relevant scipy.special functions to Rust. The implementation follows the project structure by providing pure Rust translations from the scipy.special Cython code with trait-based function overloading for real and complex types.

  • Adds eval_jacobi and eval_legendre functions for evaluating Jacobi and Legendre polynomials at a point
  • Implements sealed trait pattern for supporting both f64 and Complex64 types with i32 and f64 degree parameters
  • Includes comprehensive test coverage with manual test cases and scipy-derived expected values

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/scipy_special/orthogonal_eval.rs New module implementing Jacobi and Legendre polynomial evaluation functions with trait-based dispatch for different types
src/scipy_special/mod.rs Adds orthogonal_eval module and exports eval_jacobi and eval_legendre functions
src/lib.rs Updates crate-level documentation to include new orthogonal polynomials section

@jorenham jorenham mentioned this pull request Nov 3, 2025
13 tasks
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jorenham jorenham merged commit fcfa02d into master Nov 3, 2025
7 checks passed
@jorenham jorenham deleted the eval_jacobi branch November 3, 2025 03:26
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

Successfully merging this pull request may close these issues.

1 participant