Opened 9 years ago

#8675 new Bugs

numpy integers not accepted by Boost.Python

Reported by: Andreas Kloeckner <inform@…> Owned by: Ralf W. Grosse-Kunstleve
Milestone: To Be Determined Component: python USE GITHUB
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc: inform@…

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.