Skip to content

Conversation

@jorenham
Copy link
Member

  • add missing y attribute
  • fix incorrect constructor parameter annotation for t0
  • complex128 support
  • .dense_output() scalar-type specialization
  • slightly incorrect .direction and .step_size types

Closes #879

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 fixes several issues in the ODE solver type stubs to improve type accuracy and consistency. The changes focus on proper generic parameterization, adding missing attributes, and correcting type annotations.

  • Add missing y attribute to OdeSolver class
  • Parameterize DenseOutput classes with scalar types for better type safety
  • Fix incorrect type annotations for constructor parameters and method return types

Reviewed Changes

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

Show a summary per file
File Description
scipy-stubs/integrate/_ivp/base.pyi Major refactoring of base classes with generic parameterization, added missing y attribute, and improved type annotations
scipy-stubs/integrate/_ivp/rk.pyi Updated RkDenseOutput and Dop853DenseOutput to inherit from parameterized DenseOutput
scipy-stubs/integrate/_ivp/radau.pyi Updated RadauDenseOutput to inherit from DenseOutput[np.float64]
scipy-stubs/integrate/_ivp/lsoda.pyi Updated LsodaDenseOutput to inherit from DenseOutput[np.float64]
scipy-stubs/integrate/_ivp/bdf.pyi Updated BdfDenseOutput to inherit from DenseOutput[np.float64]
scipy-stubs/integrate/_ivp/ivp.pyi Updated function parameter to use parameterized DenseOutput[Any]
scipy-stubs/integrate/_ivp/common.pyi Updated type variable bound to use parameterized DenseOutput

@github-actions
Copy link

mypy_primer results

No ecosystem changes detected ✅

@jorenham jorenham merged commit 9799dc6 into master Sep 12, 2025
22 checks passed
@jorenham jorenham deleted the gh-879 branch September 12, 2025 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

integrate._ivp.base.OdeSolver incomplete/missing annotations

2 participants