https://github.com/pybind/pybind11
Revision 705efccecdf8632612dfb538008efa02c862d615 authored by Sebastian Berg on 26 March 2024, 22:20:11 UTC, committed by GitHub on 26 March 2024, 22:20:11 UTC
* API: Make `numpy.h` compatible with both NumPy 1.x and 2.x * TST: Update numpy dtype flags test to not covert flags to char * API: Add `numpy2.h` instead and make `numpy.h` safe This means that users of `numpy.h` cannot be broken, but need to update to `numpy2.h` if they want to compile for NumPy 2. Using Macros simply and didn't bother to try to remove unnecessary code paths. * API: Rather than `numpy2.h` use a define for the user. * Thread `PYBIND11_NUMPY2_SUPPORT` through things and try to adept test matrix * Small fixups (shouldn't matter)? * Fixup. Does upgrading scipy help? (it shouldn't?) (Some other small fixup) * Use NumPy 2 nightlies for ubuntu-latest job also * BUG: Fix numpy.bool check * TST: Fix complexwarning * BUG: Fix the fact that only the 50 slot is filled with the copy alias (There were 3 functions all doing the same, only this slot survived 2.x) * TST: One more test tweak * TST: Use "long" name for long, since it changed on windows * TST: Apparently we didn't always have ulong, so just use `L` * TST: Enforce dtype='l' for test as default isn't long anymore on windows * Rename macro and invert logic to PYBIND11_NUMPY_1_ONLY * PYBIND11_INTERNAL_NUMPY_1_ONLY_DETECTED * Test and code comment expansion * CI: Use pre-releases of numpy/scipy from pip via explicit version * CI: NumPy 2 only available on almalinux (as it is Python >=3.9) * MAINT: Match name more exactly and adopt error phrasing * MAINT: Pushed early, move helper to be private member * fix error message compilation when using NumPy 1.x-only backcompat * silence name shadowing warning * chore: minor optimization Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent e0f2c71
Tip revision: 705efccecdf8632612dfb538008efa02c862d615 authored by Sebastian Berg on 26 March 2024, 22:20:11 UTC
feat: make `numpy.h` compatible with both NumPy 1.x and 2.x (#5050)
feat: make `numpy.h` compatible with both NumPy 1.x and 2.x (#5050)
Tip revision: 705efcc
File | Mode | Size |
---|---|---|
.github | ||
docs | ||
include | ||
pybind11 | ||
tests | ||
tools | ||
.appveyor.yml | -rw-r--r-- | 1.2 KB |
.clang-format | -rw-r--r-- | 996 bytes |
.clang-tidy | -rw-r--r-- | 2.5 KB |
.cmake-format.yaml | -rw-r--r-- | 2.1 KB |
.codespell-ignore-lines | -rw-r--r-- | 1.3 KB |
.gitattributes | -rw-r--r-- | 18 bytes |
.gitignore | -rw-r--r-- | 502 bytes |
.pre-commit-config.yaml | -rw-r--r-- | 3.6 KB |
.readthedocs.yml | -rw-r--r-- | 276 bytes |
CMakeLists.txt | -rw-r--r-- | 13.4 KB |
LICENSE | -rw-r--r-- | 1.6 KB |
MANIFEST.in | -rw-r--r-- | 247 bytes |
README.rst | -rw-r--r-- | 7.5 KB |
SECURITY.md | -rw-r--r-- | 688 bytes |
noxfile.py | -rw-r--r-- | 2.7 KB |
pyproject.toml | -rw-r--r-- | 2.2 KB |
setup.cfg | -rw-r--r-- | 1.5 KB |
setup.py | -rw-r--r-- | 4.7 KB |
Computing file changes ...