Skip to content

Conversation

@Abhi210
Copy link
Contributor

@Abhi210 Abhi210 commented Oct 16, 2025

This PR is related to gh-11521 and removes long-deprecated code paths innumpy/lib/_function_base_impl:

  • Removed numpy.trapz, deprecated in NumPy 2.0 (2023-08-18)
  • Removed disp method
  • Removed bias and ddof arguments from numpy.corrcoef.
  • Removed associated tests from numpy/lib/tests/test_function_base.py and
    numpy/_core/test_deprecations.py

Associated tests and type stubs were also updated. All tests and Ruff checks pass locally.

…of` args in `corrcoef`

This commit removes long-deprecated code paths in `numpy/lib/_function_base_impl`:
- Removed `numpy.trapz`, deprecated in NumPy 2.0 (2023-08-18)
- Removed `disp` method
- Removed `bias` and `ddof` arguments from `numpy.corrcoef`
Removed associated tests from `numpy/lib/tests/test_function_base.py` and
  `numpy/_core/test_deprecations.py`

Associated tests and type stubs were also updated.
All tests and Ruff checks pass locally.
@mattip
Copy link
Member

mattip commented Oct 16, 2025

LGTM. Please add a release note like the one for 29986 but with this PR's number

@mattip mattip added the 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes label Oct 16, 2025
Copy link
Member

@jorenham jorenham left a comment

Choose a reason for hiding this comment

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

Looks good; thanks

Copy link
Member

@jorenham jorenham left a comment

Choose a reason for hiding this comment

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

I left some nitpickings

…rcoef`

Removes leftover deprecation logic for the `bias` and `ddof` arguments
in `numpy.corrcoef` from `extra.py`. These arguments were already
deprecated and removed from `_function_base_impl`.

No functional changes beyond removing redundant code. All tests and
Ruff checks pass locally.
…from

`numpy.ma.extras` and updates the related tests.

In addition:
- Removed redundant declarations of `bias` and `ddof` in `extras.py`
  (deprecated since NumPy 2.0)
- Removed associated tests from `test_extras.py` and `test_regression.py`
- Amended `numpy/lib/_function_base_impl.py` to fully remove these arguments
  from function signatures and ensure consistency with documentation
- Documented the above changes in the release notes

All tests and Ruff checks pass locally.
@Abhi210 Abhi210 force-pushed the gh-11521-remove-deprecations branch from 6b39500 to 7065a9d Compare October 17, 2025 08:35
@Abhi210
Copy link
Contributor Author

Abhi210 commented Oct 17, 2025

Hello!

I found that there were still some redundant declarations of the bias and ddof arguments in the corrcoef function within extras.py, so I’ve removed them. The corresponding tests were also removed from test_extras.py. Additionally, I had previously forgotten to remove bias and ddof from the corrcoef function signature itself. This has now been corrected.

Lastly, I’ve updated the release notes as suggested by @jorenham. Thank you for bringing these issues to my attention, and I apologize for the earlier oversight.

Abhi210 and others added 2 commits October 17, 2025 14:08
…rcoef`

Removes leftover deprecation logic for the `bias` and `ddof` arguments
in `numpy.corrcoef` from `extra.py`. These arguments were already
deprecated and removed from `_function_base_impl`.

No functional changes beyond removing redundant code. All tests and
Ruff checks pass locally.
@mattip
Copy link
Member

mattip commented Oct 17, 2025

The previous commit passed all but documentation builds, and the last commit fixed (hoepfully) only documentation problems. I don't think it is worth more iterations on the release note, anyway the release manager can (and sometime does) edit the generated notes before publishing them.

@mattip mattip merged commit a3c55b6 into numpy:main Oct 17, 2025
4 checks passed
@mattip
Copy link
Member

mattip commented Oct 17, 2025

Thanks @Abhi210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

03 - Maintenance 56 - Needs Release Note. Needs an entry in doc/release/upcoming_changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants