[C++-sig] problem with numarray >= 1.4
David Abrahams
dave at boost-consulting.com
Mon Jan 16 14:28:34 CET 2006
"Paul F. Kunz" <Paul_Kunz at slac.stanford.edu> writes:
> I'm having trouble using numarray >= 1.4.1 with Boost.Python.
> I create a numarry called `high' (code to follow), and I get the
> following
>
>>>> h = high[1]
>>>> h.__class__
> <class 'numarray.numarraycore.NumArray'>
>>>> hh = h/10
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1209083328 (LWP 8852)]
> 0x007215b0 in array_divide (m1=0xbff0b2a8, m2=0xbff0b2a8)
> at Src/_numarraymodule.c:512
> (gdb)
The Boost.Python interface to NumArray is so unsophisticated that it's
very hard to imagine the bug is in Boost.Python. Boost.Python doesn't
know anything about numarray at the C/C++ level; it merely uses the
Python C API to load the numarray module, and thereafter it treats a
numarray object like any other boost::python::object, except that we
provide some convenience methods, e.g.:
object array_base::argmin(long axis)
{
return attr("argmin")(axis);
}
So I suggest you look into your own code and the code of the latest
NumArray release.
Sorry,
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list