- 15 Sep, 2021 1 commit
-
-
Matthias Köppe authored
-
- 09 Sep, 2021 1 commit
-
-
Ralf W. Grosse-Kunstleve authored
* Adding google-explicit-constructor to .clang-tidy * clang-tidy explicit attr.h (all automatic) * clang-tidy explicit cast.h (all automatic) * clang-tidy detail/init.h (1 NOLINT) * clang-tidy detail/type_caster_base.h (2 NOLINT) * clang-tidy pybind11.h (7 NOLINT) * clang-tidy detail/common.h (3 NOLINT) * clang-tidy detail/descr.h (2 NOLINT) * clang-tidy pytypes.h (23 NOLINT, only 1 explicit) * clang-tidy eigen.h (7 NOLINT, 0 explicit) * Adding 2 explicit in functional.h * Adding 4 explicit in iostream.h * clang-tidy numpy.h (1 NOLINT, 1 explicit) * clang-tidy embed.h (0 NOLINT, 1 explicit) * clang-tidy tests/local_bindings.h (0 NOLINT, 4 explicit) * clang-tidy tests/pybind11_cross_module_tests.cpp (0 NOLINT, 1 explicit) * clang-tidy tests/pybind11_tests.h (0 NOLINT, 2 explicit) * clang-tidy tests/test_buffers.cpp (0 NOLINT, 2 explicit) * clang-tidy tests/test_builtin_casters.cpp (0 NOLINT, 4 explicit) * clang-tidy tests/test_class.cpp (0 NOLINT, 6 explicit) * clang-tidy tests/test_copy_move.cpp (0 NOLINT, 7 explicit) * clang-tidy tests/test_embed/external_module.cpp (0 NOLINT, 1 explicit) * clang-tidy tests/test_embed/test_interpreter.cpp (0 NOLINT, 1 explicit) * clang-tidy tests/object.h (0 NOLINT, 2 explicit) * clang-tidy batch of fully automatic fixes. * Workaround for MSVC 19.16.27045.0 C++17 Python 2 C++ syntax error.
-
- 26 Aug, 2021 2 commits
-
-
Nick Cullen authored
* reshape * more tests * Update numpy.h * Update test_numpy_array.py * array view * test * Update test_numpy_array.cpp * Update numpy.h * Update numpy.h * Update test_numpy_array.cpp * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix merge bug * Make clang-tidy happy * Add xfail for PyPy * Fix casting issue * Fix formatting * Apply clang-tidy * Address reviews on additional tests * Fix ordering * Do a little more reordering * Fix typo * Try improving tests * Fix error in reshape * Add one more reshape test * Fix bugs and add test * Relax test * streamlining new tests; removing a few stray msg * Fix style revert * Fix clang-tidy * Misc tweaks: * Comment: matching style in file (///), responsibility sentence, consistent punctuation. * Replacing `unsigned char` with `uint8_t` for max consistency. * Removing `1` from `array_view1` because there is only one. * Partial clang-format-diff. Co-authored-by:
ncullen93 <ncullen.th@dartmouth.edu> Co-authored-by:
NC Cullen <nicholas.c.cullen.th@dartmouth.edu> Co-authored-by:
Aaron Gokaslan <skylion.aaron@gmail.com> Co-authored-by:
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by:
Ralf Grosse-Kunstleve <rwgk@google.com>
-
Nick Cullen authored
* reshape * more tests * Update numpy.h * Update test_numpy_array.py * Update numpy.h * Update numpy.h * Update test_numpy_array.cpp * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix merge bug * Make clang-tidy happy * Add xfail for PyPy * Fix casting issue * Address reviews on additional tests * Fix ordering * Do a little more reordering * Fix typo * Try improving tests * Fix error in reshape * Add one more reshape test * streamlining new tests; removing a few stray msg Co-authored-by:
ncullen93 <ncullen.th@dartmouth.edu> Co-authored-by:
NC Cullen <nicholas.c.cullen.th@dartmouth.edu> Co-authored-by:
Aaron Gokaslan <skylion.aaron@gmail.com> Co-authored-by:
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by:
Ralf Grosse-Kunstleve <rwgk@google.com>
-
- 19 Aug, 2021 1 commit
-
-
Ralf W. Grosse-Kunstleve authored
Cleanup of file-scoped and globally-scoped warning suppression pragmas across pybind11 header files. (#3201) * Removing all MSVC C4127 warning suppression pragmas. * Removing MSVC /WX (WERROR). To get a full list of all warnings. * Inserting PYBIND11_SILENCE_MSVC_C4127. Changing one runtime if to #if. * Changing PYBIND11_SILENCE_MSVC_C4127 macro to use absolute namespace (for use outside pybind11 include directory). * Restoring MSVC /WX (WERROR). * Removing globally-scoped suppression for clang -Wunsequenced. Based on an experiment under PR #3202 it is obsolete and can simply be removed.
-
- 09 Aug, 2021 2 commits
-
-
Ralf W. Grosse-Kunstleve authored
* Removing pragma for GCC -Wattributes, fixing forward declarations. * Introducing PYBIND11_NOINLINE_FWD to deal with CUDA, GCC7, GCC8. * Updating PYBIND11_NOINLINE_DCL in Doxyfile. * Trying noinline, noinline for {CUDA, GCC7, GCC8} * Trying noinline, inline for {CUDA, GCC7, GCC8} * Adding GCC -Wattributes `pragma` in 3 header files. * Introducing PYBIND11_NOINLINE_GCC_PRAGMA_ATTRIBUTES_NEEDED, used in 9 header files. * Removing ICC pragma 2196, to see if it is still needed. * Trying noinline, noinline for ICC * Trying noinline, inline for ICC * Restoring ICC pragma 2196, introducing PYBIND11_NOINLINE_FORCED, defined for testing. * Removing code accidentally left in (was for experimentation only). * Removing one-time-test define. * Removing PYBIND11_NOINLINE_FWD macro (after learning that it makes no sense). * Testing with PYBIND11_NOINLINE_DISABLED. Minor non-functional enhancements. * Removing #define PYBIND11_NOINLINE_DISABLED (test was successful). * Removing PYBIND11_NOINLINE_FORCED and enhancing comments for PYBIND11_NOINLINE. * WIP stripping back * Making -Wattributes pragma in pybind11 specific to GCC7, GCC8, CUDA. -
Aaron Gokaslan authored
* maint(perf): Optimize Numpy Constructor with additional std::move * Add more moves
-
- 06 Aug, 2021 1 commit
-
-
Aaron Gokaslan authored
* Enable bugprone checks * Reset delta and massage config * Start to apply bugprone fixes * try to fix minor bug * Fix later * Fix perfect forwarding bugprone * Remove nolint * undo constructor delete * Fix bugprone-perfect-forwarding again * Remove TODO * Add another nolint for bugprone-exception-escape in scoped interpreter * Fix remaining bugprone errors * Properly apply bugprone-macro-parantheses * Redo formatting and remove bugprone nolint * Add coment and revert more whitespace changes * Fix typo * Fix parsing bug * Add back comma * Fix clang-tidy issue * Apply remaining clang-tidy fixes
-
- 27 Jul, 2021 1 commit
-
-
Aaron Gokaslan authored
* maint(clang-tidy) Improve code readability * Fix minor typos * Revert optimization that removed test case * Fix comment formatting * Revert another optimization to repro an issue * Remove make_unique since it C++14 and newer only * eformat comments * Fix unsignedness of comparison * Update comment
-
- 09 Jul, 2021 1 commit
-
-
Aaron Gokaslan authored
* Enable clang-tidy else-after-return and redundant void checks * Fix remaining else-after * Address reviewer comments * Fix indentation * Rerun clang-tidy post merge
-
- 21 Jun, 2021 1 commit
-
-
Aaron Gokaslan authored
* Enable and apply clang-tidy readability and misc fixes. * Revert deprecated tester * add space to tests/test_constants_and_functions.cpp
-
- 19 Jun, 2021 1 commit
-
-
Aaron Gokaslan authored
* Apply performance fixes from clang-tidy * 2nd Round of Perf Optimizations * 3rd round of fixes & handle false-positive * Apply missing fix and clang-format * Apply reviewer comment
-
- 08 Jun, 2021 1 commit
-
-
Jack S. Hale authored
* Add const T to docstring generation. * Change order. * See if existing test triggers for a const type. * Add tests. * Fix test. * Remove experiment. * Reformat. * More tests, checks run. * Adding `test_fmt_desc_` prefix to new test functions. * Using pytest.mark.parametrize to 1. condense test; 2. exercise all functions even if one fails; 3. be less platform-specific (e.g. C++ float is not necessarily float32). Co-authored-by:Ralf W. Grosse-Kunstleve <rwgk@google.com>
-
- 19 Apr, 2021 1 commit
-
-
mvoelkle-cern authored
When the user defines _GLIBCXX_USE_CXX11_ABI=0 to force the pre-c++11 ABI, numpy.h assumes that is_trivially_copyable is available. It is not necessarily the case. This patch uses clang's feature detection instead. The workaround is for certain libstdc++ versions, so the test should target these particular versions.
-
- 23 Feb, 2021 1 commit
-
-
Bertrand MICHEL authored
* [dtype]: add type() method to access type attribute of PyArray_Descr (eq. to dtype.char in Python) * [dtype] change type() name method to char_() to be compliant with Python numpy interface * [dtype] fix by pre-commit * [dtype] Change comments and solutions format for test * Clarify documentation and move note about dtype.char vs PyArray_Descr::type to a plain, non-doxygen comment * Fix and extend tests * Fix the supposedly fixed tests * Fix the fixed tests again Co-authored-by:
Bertrand MICHEL <bertrand.michel@onera.fr> Co-authored-by:
Yannick Jadoul <yannick.jadoul@belgacom.net>
-
- 09 Nov, 2020 1 commit
-
-
Robert Haschke authored
* style: clang-tidy: modernize-use-using * style: more clang-tidy checking Co-authored-by:Henry Schreiner <henryschreineriii@gmail.com>
-
- 15 Oct, 2020 2 commits
-
-
Henry Schreiner authored
-
Henry Schreiner authored
-
- 03 Oct, 2020 2 commits
-
-
Fritz Reese authored
* tests: New test for ctypes buffers (pybind#2502) * fix: fix buffer_info segfault on views with no stride (pybind11#2502) * Explicit conversions in buffer_info to make clang happy (pybind#2502) * Another explicit cast in buffer_info constructor for clang (pybind#2502) * Simpler implementation of buffer_info constructor from Py_buffer. * Move test_ctypes_buffer into test_buffers * Comment on why view->strides may be NULL (and fix some whitespace) * Use c_strides() instead of zero when view->strides is NULL. c_strides and f_strides are moved from numpy.h (py::array) to buffer_info.h (py::detail) so they can be used from the buffer_info Py_buffer constructor. * Increase ctypes buffer test coverage in test_buffers. * Split ctypes tests and skip one which is broken in PyPy2.
-
Henry Schreiner authored
* WIP: module -> module_ without typedef * refactor: allow py::module to work again
-
- 02 Oct, 2020 2 commits
-
-
Yannick Jadoul authored
* Allow function/functor passed to py::vectorize to return void * Stealing @sizmailov's test and fixing unused argument warning * Add missing std::move() RVO doesn't work here because function return type is different from actual returned type * remove extra EOL * docs: add a few details * chore: pre-commit autoupdate * Remove array_iterator, array_begin, and array_end (in detail namespace) Co-authored-by:
Sergei Izmailov <sergei.a.izmailov@gmail.com> Co-authored-by:
Henry Schreiner <henryschreineriii@gmail.com>
-
Yannick Jadoul authored
Add unchecked_reference::operator() and operator[] to overload resolution of unchecked_mutable_reference (#2514)
-
- 16 Sep, 2020 1 commit
-
-
Boris Staletic authored
Support C++20. For backwards compatibility, we provide an alias for the old name. This change is necessary to easily avoid errors when a compiler thinks `module` is used as a keyword.
-
- 15 Sep, 2020 3 commits
-
-
Henry Schreiner authored
-
Henry Schreiner authored
-
Yannick Jadoul authored
Stop py::array_t arguments from accepting arrays that do not match the C- or F-contiguity flags (#2484) * Stop py::array_t arguments from accepting arrays that do not match the C- or F-contiguity flags * Add trivially-contiguous arrays to the tests
-
- 10 Sep, 2020 1 commit
-
-
Henry Schreiner authored
* fix: support nvcc and test * fixup! fix: support nvcc and test * docs: mention what compilers fail * fix: much simpler logic * refactor: slightly faster / clearer
-
- 14 Aug, 2020 1 commit
-
-
Henry Schreiner authored
* fix: add missing signature * fix: add to array_t too
-
- 26 Jul, 2020 1 commit
-
-
Henry Schreiner authored
-
- 12 Jul, 2020 1 commit
-
-
Boris Staletic authored
- `PyArray_NewFromDescr_` should have been using `Py_intptr_t const *` - https://github.com/numpy/numpy/blob/18a6e3e505ee416ddfc617f3e9afdff5a031c2c2/numpy/core/src/multiarray/ctors.h#L5-L8 - `PyArray_GetArrayParamsFromObject_` should be using `NPY_BOOL` - https://github.com/numpy/numpy/blob/18a6e3e505ee416ddfc617f3e9afdff5a031c2c2/numpy/core/src/multiarray/ctors.c#L1350-L1355 - https://docs.scipy.org/doc/numpy-1.13.0/reference/c-api.dtype.html#c.npy_bool - `PyArray_DescrNewFromType` is at offset 96 - https://github.com/numpy/numpy/blob/36e017194c32a53cf2965a513243cb3c348095df/numpy/core/code_generators/numpy_api.py#L141 - `array_t` constructor that takes a size and a pointer should take `ssize_t`. - Fixes #1599
-
- 08 Jul, 2020 1 commit
-
-
Yannick Jadoul authored
* Change NAMESPACE_BEGIN and NAMESPACE_END macros into PYBIND11_NAMESPACE_BEGIN and PYBIND11_NAMESPACE_END * Fix sudden HomeBrew 'python not installed' error * Sweep difference in 'Class.__init__() must be called when overriding __init__' error message between CPython and PyPy under the rug * Homebrew updated to 3.8 yesterday. Co-authored-by:Henry Schreiner <HenrySchreinerIII@gmail.com>
-
- 10 Jun, 2020 2 commits
-
-
Sergei Izmailov authored
-
Sergei Izmailov authored
-
- 26 Apr, 2020 1 commit
-
-
peter authored
-
- 28 Nov, 2019 2 commits
-
-
Wenzel Jakob authored
This reverts commit 61e4f118.
-
Wenzel Jakob authored
-
- 21 Sep, 2019 1 commit
-
-
Wenzel Jakob authored
-
- 27 Jul, 2019 1 commit
-
-
Pauli Virtanen authored
PyArray_DescrFromType returns a new reference, not borrowed one
-
- 23 Jul, 2019 1 commit
-
-
Eric Cousineau authored
Test for dtype checks now succeed without warnings
-
- 15 Jul, 2019 1 commit
-
-
Igor Socec authored
* Test dtype field order in numpy dtype tests When running tests with NumPy 1.14 or later this test exposes the "invalid buffer descriptor" error reported in #1274. * Create dtype_ptr with ordered fields
-