Skip to content

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Dec 26, 2024

Reference issue

Toward gh-21466
gh-21446

What does this implement/fix?

linalg.toeplitz, linalg.solve_toeplitz, linalg.matmul_toeplitz document that c and r with dimensionality greater than 1 will be raveled.

gh-21446 added a warning thattoeplitz would no longer ravel in 1.17; rather, multidimensional arrays would be treated as batches of 1-D arrays.

This adds similar warnings to linalg.solve_toeplitz and linalg.matmul_toeplitz. It also removes the documentation that n-D arrays will be raveled; it is still implicit in the admonition, and we don't really want to advertise it for new uses.

Additional information

@tylerjereddy any chance we can get this into 1.15 from the perspective that toeplitz, solve_toeplitz, matmul_toeplitz are a tuple and should have been treated together? This also fixes typos in the existing warnings.

If not, I propose that we still document that this behavior will be changed in 1.17. Our public deprecation policy is

a deprecation warning will be raised for one SciPy release before the change is made.

and in the Core Developer Guide, it says the change can be implemented 6 months after the release that includes the warning (and historically, the winter release tends to be >6 months after the summer release). I know we usually give two releases, but it would be nice to finish these up at the same time, and I expect these will be very low impact.

@mdhaber mdhaber added scipy.linalg maintenance Items related to regular maintenance tasks labels Dec 26, 2024
@github-actions github-actions bot added the deprecated Items related to behavior that has been deprecated label Dec 26, 2024
@tylerjereddy tylerjereddy added the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Dec 26, 2024
@tylerjereddy
Copy link
Contributor

@tylerjereddy any chance we can get this into 1.15 from the perspective that toeplitz and solve_toeplitz are a pair and should have been treated together?

It isn't ideal to do it after RC2 of course, but I think we can probably do it. I put a tentative backport label. Ideally we signal our deprecation intentions at RC1, but I've accepted more dramatic last-minute additions than this for this cycle.

Anyway, I'll see if there's strong pushback on it... but the label will at least remind me to look and see what the discussion (if one develops) was.

@tylerjereddy tylerjereddy added this to the 1.16.0 milestone Dec 26, 2024
@mdhaber mdhaber changed the title DEP: linalg.solve_toeplitz: warn on n-D c, r DEP: linalg.solve_toeplitz/matmul_toeplitz: warn on n-D c, r Dec 26, 2024
@j-bowhay
Copy link
Member

If we are going to backport this is it worth also updating the release notes with the added deprecation in this pr?

Copy link
Member

@j-bowhay j-bowhay left a comment

Choose a reason for hiding this comment

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

Thanks, changes look good to me! I given this brings these functions inline with toeplitz hopefully this is fairly uncontroversial

Copy link
Contributor

@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

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

Looks "ok" to me as well after reading through the diff.

I'll squash merge for backport sanity.

@tylerjereddy tylerjereddy merged commit e9722d4 into scipy:main Dec 27, 2024
34 checks passed
@j-bowhay j-bowhay mentioned this pull request Dec 28, 2024
32 tasks
@tylerjereddy tylerjereddy modified the milestones: 1.16.0, 1.15.0 Jan 2, 2025
tylerjereddy pushed a commit to tylerjereddy/scipy that referenced this pull request Jan 2, 2025
…py#22193)

* DEP: linalg.solve_toeplitz: warn on n-D c, r

* MAINT: linalg.matmul_toeplitz: add admonition to documentation; test warning

* DOC: update release notes

[docs only]
tylerjereddy added a commit that referenced this pull request Jan 2, 2025
…inal

* DEP: linalg.solve_toeplitz/matmul_toeplitz: warn on n-D `c`, `r` (#22193)

* DEP: linalg.solve_toeplitz: warn on n-D c, r

* MAINT: linalg.matmul_toeplitz: add admonition to documentation; test warning

* DOC: update release notes

[docs only]

* DOC: differentiate.jacobian: correct/improve documentation about callable interface

[docs only]

* Update scipy/differentiate/_differentiate.py

[docs only]

* DOC: Update 1.15.0 relnotes

* Update the SciPy `1.15.0` release notes following
additional backport activity.

* MAINT: PR 22233 wheel build [wheel build]

* Test wheel builds in above PR before release
process starts.

[wheel build]

---------

Co-authored-by: Matt Haberland <mhaberla@calpoly.edu>
@tylerjereddy tylerjereddy removed the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated Items related to behavior that has been deprecated maintenance Items related to regular maintenance tasks scipy.linalg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants