[C++-sig] getting shape of numpy array

2009-11-10 Thread Nathan Huesken
Hi, I am trying to interaface a numpy array using boost::python::numeric::array. void function(numeric::array& a) { tuple shape=extract(a.getshape()); double x; int i,j; for(i=0;i(a[make_tuple(i,j)]); } Now I had to add numeric::array::set_module_and_type("numpy",

Re: [C++-sig] getting shape of numpy array

2009-11-10 Thread Michele De Stefano
Hello Nathan. Find my answers below. 2009/11/10 Nathan Huesken : > Hi, > > I am trying to interaface a numpy array using boost::python::numeric::array. > > void function(numeric::array& a) > { >        tuple shape=extract(a.getshape()); >        double x; >        int i,j; >        for(i=0;i    

[C++-sig] [Boost.Python] tutorial python extension fails on import with ImportError: No module named hello_ext

2009-11-10 Thread Charles Lentz
Hey all, When using boost_1_38_0\libs\python\example\tutorial, I try to import the extension that is created (hello_ext) but get the exception, ImportError: No module named hello_ext Here's some details that might be needed: OS: Windows Vista Boost version: 1.38.0 Bjam version: 3.1.1