Skip to content

Conversation

ev-br
Copy link
Member

@ev-br ev-br commented May 29, 2024

Previously, the return value was either an array (possibly 0D) or a python float. Given that BSpline.__call__ always returns 0D arrays not python scalars, and so do PPoly.__call__ and PPoly.integrate, there is really no fundamental reason for the dtype variation. (The actual reason is an oversight when adding a fast path).

Strictly speaking, this is a backwards compat break. Still I'd say it's a bug, and the break should not be too bad for users.

Previously, the return value was either an array (possibly 0D) or
a python float. Given that __call__ always returns 0D arrays, and
so is PPoly.__call__ and PPoly.integrate, there is really no
fundamental reason to not make the return type stable.

Strictly speaking, this is a backwards compat break.
@ev-br ev-br added defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.interpolate labels May 29, 2024
Copy link
Member

@tupui tupui left a comment

Choose a reason for hiding this comment

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

+1 I would also consider this a bug.

@tupui tupui merged commit 63b1115 into scipy:main May 30, 2024
@tupui tupui added this to the 1.15.0 milestone May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants