Skip to content

✨🐛 stub _core._multiarray_umath, and many related fixes & improvements #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

jorenham
Copy link
Member

  • moved all members in _core.multiarray to _core._multiarray_umath
  • moved broadcast, busdaycalendar, flatiter, and from_dlpack, from __init__ to _core._multiarray_umath
  • add the missing implicit re-exports _core.multiarray, of which there were more than 100
  • add the missing implicit re-exports of the private numpy subpackages in __init__
  • improved many (if not most) of the classes and functions that were moved into _core._multiarray_umath, and corrected several minor bugs
  • fixed all typing errors in _core.multiarray
  • removed some incorrect rejection tests (valid at runtime)
  • removed some incorrect acceptance tests (raises at runtime)
  • simplified the ufunc definitions in __init__ (by setting the ufunc.identity type param default to None)
  • replaced some long TypeAlias with TypeAliasType, reducing the type-checker error message spaghetti

closes #110
towards ##98
towards #121

@jorenham jorenham added this to the v2.2.x.0 milestone Feb 11, 2025
@jorenham jorenham merged commit 1150a03 into main Feb 11, 2025
1 check passed
@jorenham jorenham deleted the numpy._core.multiarray branch February 11, 2025 22:20
@jorenham jorenham mentioned this pull request Feb 11, 2025
10 tasks
@jorenham jorenham added the port: to numpy NumType PR's that should be ported to NumPy label Feb 11, 2025
@jorenham

This comment was marked as outdated.

jorenham added a commit to jorenham/numpy that referenced this pull request Mar 14, 2025
jorenham added a commit to jorenham/numpy that referenced this pull request Mar 14, 2025
jorenham added a commit to jorenham/numpy that referenced this pull request Mar 14, 2025
@jorenham
Copy link
Member Author

I tried backporting it in https://github.com/jorenham/numpy/tree/numtype/122/probably-not-a-good-idea-after-all, but now that I see the huge diff, I don't think that backporting this is a good idea anymore

@jorenham jorenham removed the port: to numpy NumType PR's that should be ported to NumPy label Mar 14, 2025
jorenham added a commit to jorenham/numpy that referenced this pull request Mar 14, 2025
jorenham added a commit to jorenham/numpy that referenced this pull request Mar 14, 2025
charris pushed a commit to charris/numpy that referenced this pull request Mar 15, 2025
charris added a commit to numpy/numpy that referenced this pull request Mar 15, 2025
* TYP: don't use literals in shape-types

Partial backport of numpy/numtype#122 and numpy/numtype#152

* TYP: annotate the missing ``ufunc.resolve_dtypes`` method

Ported from numpy/numtype#218

* TYP: stub ``numpy._core.overrides``

Ported from numpy/numtype#226

* TYP: stub ``numpy._utils``

Ported from numpy/numtype#225

* TYP: stub ``numpy._core._dtype[_ctypes]``

Ported from numpy/numtype#227

* TYP: stub the remaining ``numpy._core.*`` modules

Ported from numpy/numtype#241

* TYP: stub the missing submodules of ``numpy.linalg``

Ported from numpy/numtype#248

* TYP: stub ``numpy._pyinstaller``

Ported from numpy/numtype#264

* TYP: stub ``numpy.fft.helper`` (deprecated)

Ported from numpy/numtype#261

* TYP: annotate the missing deprecated ``row_stack`` function

Ported from numpy/numtype#223

---------

Co-authored-by: jorenham <[email protected]>
MaanasArora pushed a commit to MaanasArora/numpy that referenced this pull request Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stubs missing for numpy._core._multiarray_umath
1 participant