1. 09 Apr, 2017 1 commit
    • Fix Eigen argument doc strings · e9e17746
      Many of the Eigen type casters' name() methods weren't wrapping the type
      description in a `type_descr` object, which thus wasn't adding the
      "{...}" annotation used to identify an argument which broke the help
      output by skipping eigen arguments.
      
      The test code I had added even had some (unnoticed) broken output (with
      the "arg0: " showing up in the return value).
      
      This commit also adds test code to ensure that named eigen arguments
      actually work properly, despite the invalid help output.  (The added
      tests pass without the rest of this commit).
      Jason Rhinelander committed
  2. 08 Apr, 2017 2 commits
  3. 07 Apr, 2017 2 commits
  4. 06 Apr, 2017 3 commits
    • Remove object::borrowed/stolen · 16c86638
      PR #771 deprecated them as they can cause linking failures (#770), but
      the deprecation tags cause warnings on GCC 5.x through 6.2.x.  Removing
      them entirely will break backwards-compatibility consequences, but the
      effects should be minimal (only code that was inheriting from `object`
      could get at them at all as they are protected).
      
      Fixes #777
      Jason Rhinelander committed
    • Fix test_cmake_build failure with bare python exe name (fix #783) · 555dc4f0
      Besides appearing in the CMake GUI, the `:FILENAME` specifier changes
      behavior as well:
      
      cmake -DPYTHON_EXECUTABLE=python ..  # FAIL, can't find python
      cmake -DPYTHON_EXECUTABLE=/path/to/python ..  # OK
      cmake -DPYTHON_EXECUTABLE:FILENAME=python ..  # OK
      cmake -DPYTHON_EXECUTABLE:FILENAME=/path/to/python ..  # OK
      Dean Moldovan committed
    • Skip VS2015/x86 builds · 087b8d84
      AppVeyor just added support for excluding specific jobs; thhis commit
      cuts the number of builds down to 6 from 8 by eliminating the VS2015 x86
      builds.
      Jason Rhinelander committed
  5. 05 Apr, 2017 3 commits
  6. 02 Apr, 2017 3 commits
  7. 01 Apr, 2017 1 commit
  8. 30 Mar, 2017 2 commits
  9. 28 Mar, 2017 2 commits
    • Support raw string literals as input for py::eval (#766) · 194d8b99
      * Support raw string literals as input for py::eval
      * Dedent only when needed
      Dean Moldovan committed
    • Deprecated borrowed/stolen for borrowed_t{}/stolen_t{} (#771) · 6db60cd9
      The constexpr static instances can cause linking failures if the
      compiler doesn't optimize away the reference, as reported in #770.
      
      There's no particularly nice way of fixing this in C++11/14: we can't
      inline definitions to match the declaration aren't permitted for
      non-templated static variables (C++17 *does* allows "inline" on
      variables, but that obviously doesn't help us.)
      
      One solution that could work around it is to add an extra inherited
      subclass to `object`'s hierarchy, but that's a bit of a messy solution
      and was decided against in #771 in favour of just deprecating (and
      eventually dropping) the constexpr statics.
      
      Fixes #770.
      Jason Rhinelander committed
  10. 26 Mar, 2017 1 commit
  11. 24 Mar, 2017 1 commit
    • Arch-indep CMake packaging (#764) · 5b503764
      * Arch-indep CMake packaging
      
      Since pybind11 is a header-only library, the CMake packaging does not have to carry any architecture specific checks. Without this patch, the detection of pybind11 will fail on 32-bit architectures if the project was built on a 64-bit machine and vice-versa. This fix is similar to what is applied to `Eigen` and other header-only C++ libraries.
      Ghislain Antony Vaillant committed
  12. 22 Mar, 2017 10 commits
  13. 21 Mar, 2017 3 commits
    • vectorize: trivial handling for F-order arrays · b0292c1d
      This extends the trivial handling to support trivial handling for
      Fortran-order arrays (i.e. column major): if inputs aren't all
      C-contiguous, but *are* all F-contiguous, the resulting array will be
      F-contiguous and we can do trivial processing.
      
      For anything else (e.g. C-contiguous, or inputs requiring non-trivial
      processing), the result is in (numpy-default) C-contiguous layout.
      Jason Rhinelander committed
    • Stop forcing c-contiguous in py::vectorize · ae5a8f7e
      The only part of the vectorize code that actually needs c-contiguous is
      the "trivial" broadcast; for non-trivial arguments, the code already
      uses strides properly (and so handles C-style, F-style, neither, slices,
      etc.)
      
      This commit rewrites `broadcast` to additionally check for C-contiguous
      storage, then takes off the `c_style` flag for the arguments, which
      will keep the functionality more or less the same, except for no longer
      requiring an array copy for non-c-contiguous input arrays.
      
      Additionally, if we're given a singleton slice (e.g. a[0::4, 0::4] for a
      4x4 or smaller array), we no longer fail triviality because the trivial
      code path never actually uses the strides on a singleton.
      Jason Rhinelander committed
    • Throw an exception when attempting to load an incompatible holder · cd3d1fc7
      Instead of a segfault. Fixes #751.
      
      This covers the case of loading a custom holder from a default-holder
      instance. Attempting to load one custom holder from a different custom
      holder (i.e. not `std::unique_ptr`) yields undefined behavior, just as
      #588 established for inheritance.
      Dean Moldovan committed
  14. 19 Mar, 2017 2 commits
  15. 18 Mar, 2017 1 commit
  16. 17 Mar, 2017 3 commits
    • Fail to compile with MI via class_ ctor parameters · b961626c
      We can't support this for classes from imported modules (which is the
      primary purpose of a ctor argument base class) because we *have* to
      have both parent and derived to properly extract a multiple-inheritance
      base class pointer from a derived class pointer.
      
      We could support this for actual `class_<Base, ...> instances, but since
      in that case the `Base` is already present in the code, it seems more
      consistent to simply always require MI to go via template options.
      Jason Rhinelander committed
    • Use C++17 fold expression macro · d51acb68
      This puts the fold expressions behind the feature macro instead of a
      general C++17 macro.
      
      It also adds a fold expression optimization to constexpr_sum (guarded
      by the same feature macro).
      Jason Rhinelander committed
    • Eigen: don't require conformability on length-1 dimensions · efa8726f
      Fixes #738
      
      The current check for conformability fails when given a 2D, 1xN or Nx1
      input to a row-major or column-major, respectively, Eigen::Ref, leading
      to a copy-required state in the type_caster, but this later failed
      because the copy was also non-conformable because it had the same shape
      and strides (because a 1xN or Nx1 is both F and C contiguous).
      
      In such cases we can safely ignore the stride on the "1" dimension since
      it'll never be used: only the "N" dimension stride needs to match the
      Eigen::Ref stride, which both fixes the non-conformable copy problem,
      but also avoids a copy entirely as long as the "N" dimension has a
      compatible stride.
      Jason Rhinelander committed