[Boost-bugs] [Boost C++ Libraries] #8675: numpy integers not accepted by Boost.Python

Subject: [Boost-bugs] [Boost C++ Libraries] #8675: numpy integers not accepted by Boost.Python
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-08 19:14:17


#8675: numpy integers not accepted by Boost.Python
------------------------------------------+---------------------
 Reporter: Andreas Kloeckner <inform@…> | Owner: rwgk
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Python
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
------------------------------------------+---------------------
 When I pass a numpy integer (or really any object that's not exactly a
 PyIntObject) to a BPL-wrapped function, I get errors like the following:

 {{{
 ArgumentError: Python argument types in
     CLAllocator.__call__(CLAllocator, numpy.int64)
 did not match C++ signature:
     __call__((anonymous namespace)::cl_allocator {lvalue}, unsigned long)
 }}}

 It would be great if, instead of checking for exact types, Boost.Python
 could use obj.__index__() or obj.__int__() to just get the integer value.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8675>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC