Skip to content

Conversation

@jorenham
Copy link
Member

Backport of #30526.

Closes #30525

Testing

  • spin mypy passes with the updated tests
  • spin test -v passes
  • python tools/linter.py passes

Running the test in #30525 now results in the proper type information for the first histogram2d return value and the .tolist() of that np.array:

tests/minimal_numpy.py:10:17 - information: Type of "a" is "ndarray[tuple[Literal[2], Literal[2]], dtype[float64]]"
tests/minimal_numpy.py:11:17 - information: Type of "a[0]" is "Any"
tests/minimal_numpy.py:19:17 - information: Type of "al" is "list[list[float]]"
tests/minimal_numpy.py:20:17 - information: Type of "al[0]" is "list[float]"

@jorenham jorenham added 08 - Backport Used to tag backport PRs 41 - Static typing labels Dec 27, 2025
@jorenham jorenham added this to the 2.4.1 Release milestone Dec 27, 2025
@charris charris merged commit b437f7a into numpy:maintenance/2.4.x Dec 27, 2025
12 checks passed
@charris
Copy link
Member

charris commented Dec 27, 2025

Thanks for the backport .

@jorenham jorenham deleted the backport-30526 branch December 27, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 - Backport Used to tag backport PRs 41 - Static typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants