Conversation
Riaz1729
force-pushed
the
deprecate_isfortran
branch
4 times, most recently
from
September 21, 2026 03:32
435cf61 to
ba597bf
Compare
Riaz1729
force-pushed
the
deprecate_isfortran
branch
from
September 21, 2026 03:34
ba597bf to
7656382
Compare
Riaz1729
marked this pull request as ready for review
September 21, 2026 03:35
ganesh-k13
requested changes
Sep 21, 2026
| self.assert_deprecated(lambda: np.take(a, indices, out=different_dtype_out)) | ||
|
|
||
| class TestIsfortran(_DeprecationTestCase): | ||
| # Deprecation in NumPy 2.5, 2026-09 |
Member
There was a problem hiding this comment.
This should be 2.6 as dev builds right now are 2.6
| different_dtype_out = np.zeros_like(indices, dtype=np.uint32) | ||
|
|
||
| self.assert_deprecated(lambda: np.take(a, indices, out=different_dtype_out)) | ||
|
|
Member
There was a problem hiding this comment.
This might fail lint checks, have enabled the CI for you
Member
There was a problem hiding this comment.
Interesting, I had assumed we enforce two blank lines before a class.
Author
There was a problem hiding this comment.
Added the second newline in any case :)
| """ | ||
| Check if the array is Fortran contiguous but *not* C contiguous. | ||
|
|
||
| .. deprecated:: 2.5 |
Member
There was a problem hiding this comment.
Same as above, should be 2.6
| def count_nonzero(a: ArrayLike, axis: _ShapeLike | None = None, *, keepdims: py_bool = False) -> Any: ... | ||
|
|
||
| # | ||
| @deprecated("numpy.isfortran is deprecated. Use a.flags.fnc instead.") |
Member
There was a problem hiding this comment.
Would be nice to have which version it was deprecated here.
| `numpy.isfortran` is deprecated. Use ``a.flags.fnc`` instead. | ||
|
|
||
|
|
||
| This function is obsolete. If you only want to check if an array is Fortran |
Member
There was a problem hiding this comment.
nit: I think we can merge this as the above already states it's deprecated
…isfortran pull
…#32595) This optimizes two things: First the buffered iterator now allows buffer re-use reliably, but this was not enabled in the non-reduce iteration loop (maybe accidentally). Second, when the copy to the buffer can use trivial copies, this it now uses a direct copy approach for speed. Especially the buffer-reuse can make a large speed difference when it kicks in. Co-authored-by: Sebastian Berg <[email protected]>
…` and such (numpy#32706) Co-authored-by: Joren Hammudoglu <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…nput (numpy#32679) Co-authored-by: Yeonho Kim <[email protected]>
…has been built (numpy#32740) Signed-off-by: Iason Krommydas <[email protected]>
Co-authored-by: Joren Hammudoglu <[email protected]> Co-authored-by: Ralf Gommers <[email protected]>
Signed-off-by: Iason Krommydas <[email protected]>
Some overloads of `void.__getitem__()` and `generic.__getitem__()` had overlapping signatures, which could cause type checkers (at least mypy) to report errors in custom dtypes implemented downstream.
…n-deps group (numpy#32754) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Historically, we had to reject floats to match Python. But Python now always converts via `__index__` which makes this unnecessary. So we live in the future now where a float check is unnecessary to match Python `"i"` argparse behavior.
…ppet in User Guide to match the text (numpy#32758)
…isfortran pull
… into deprecate_isfortran pull
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
Deprecates
numpy.isfortranas the first half of addressing #6597Per Deprecate isfortran and a.flags.fnc #6597, this marks
numpy.isfortran, which checks if an array is Fortran contiguous and not C contiguous. The DeprecationWarning directs users to directly usea.flags.fnc(which is called bynumpy.isfortran).At some point in the future we may be able to also deprecate
a.flags.fncif it is used minimally.First time contributor introduction
I'm a new contributor and part of the NumFOCUS Volunteer Sprints Fall 2026 cohort. I wanted to take a simple issue first so that I could make sure that I understand and am comfortable following the contribution guidelines before moving to more involved issues.
AI Disclosure
I used Antigravity (Gemini 3..8 Flash) to help me understand the structure of the codebase so I could find the relevant modules quickly. I also used it to review my PR and it identified several places (including in the
docmodule) where to add additional notes/comments about the deprecation.