Re: [C++-sig] Accessing 2D array from python in C++

2012-08-22 Thread John Reid
John Reid > *To:* cplusplus-sig@python.org > *Sent:* Wednesday, August 22, 2012 1:11 PM > *Subject:* Re: [C++-sig] Accessing 2D array from python in C++ > > > > On 22/08/12 11:58, John Reid wrote: >> >> >> On 22/08/12 11:45, alfa wrote: >>> Hi John, &g

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-22 Thread alfa
have a Python array that needs to be converted to/ exposed in C++. Thanks in advance. From: John Reid To: cplusplus-sig@python.org Sent: Wednesday, August 22, 2012 1:11 PM Subject: Re: [C++-sig] Accessing 2D array from python in C++ On 22/08/12 1

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-22 Thread alfa
Hi John, "" From: John Reid To: cplusplus-sig@python.org Sent: Wednesday, August 22, 2012 12:58 PM Subject: Re: [C++-sig] Accessing 2D array from python in C++ Hi John, "You can call the expose_converters< npy_double >() function to

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-22 Thread John Reid
On 22/08/12 11:58, John Reid wrote: > > > On 22/08/12 11:45, alfa wrote: >> Hi John, >> >> I'm sorry, I'm a bit confused because previously you said that the >> relevant implementation resides in >> "c++/myrrh/myrrh/python/multi_array_to_numpy.h"but now, you point to >> "src/python/man_module.c

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-22 Thread John Reid
multiarrays of doubles to python as numpy arrays. Please ask if you have any specific questions. Regards, John. > > > > *From:* John Reid > *To:* cplusplus-sig@python.org > *Sent:* Wednesday, August 22,

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-22 Thread alfa
nt: Wednesday, August 22, 2012 12:28 PM Subject: Re: [C++-sig] Accessing 2D array from python in C++ On 22/08/12 11:13, alfa wrote: > Hi John, > > Thanks a lot for your implementation. In multi_array_to_numpy.h,  can > you give more hints on which method/function that I ca

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-22 Thread John Reid
--- > *From:* John Reid > *To:* cplusplus-sig@python.org > *Sent:* Thursday, August 16, 2012 5:02 PM > *Subject:* Re: [C++-sig] Accessing 2D array from python in C++ > > If you don't mind digging around in my code, you could download the > source code for the STEME python packag

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-22 Thread alfa
: cplusplus-sig@python.org Sent: Thursday, August 16, 2012 5:02 PM Subject: Re: [C++-sig] Accessing 2D array from python in C++ If you don't mind digging around in my code, you could download the source code for the STEME python package from pypi and look in the c++/myrrh directory. There is code to a

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-16 Thread John Reid
ast "..." in: > boost::python::class_< boost::multi_array<...> >(...) > > Thanks in advance. > > > *From:* Jim Bosch > *To:* alfa > *Cc:* Development of Python/C++ integration

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-16 Thread alfa
Cc: Development of Python/C++ integration Sent: Wednesday, August 15, 2012 5:34 PM Subject: Re: [C++-sig] Accessing 2D array from python in C++ On Aug 15, 2012 1:57 AM, "alfa" wrote: > > I apologize for double posting this because it was spammed before. > > Hi Jim, >

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-15 Thread Jim Bosch
On Aug 15, 2012 1:57 AM, "alfa" wrote: > > I apologize for double posting this because it was spammed before. > > Hi Jim, > > Do you mean, "you could wrap multi_array itself using class_", I should do as below: > > boost::python::class_ > >("PyVec").def(boost::python::vector_indexing_suite > >());

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-15 Thread alfa
; std::endl; What could be wrong or am I missing something? Thanks in advance. From: Jim Bosch To: Development of Python/C++ integration ; shahmi Sent: Tuesday, August 14, 2012 5:54 PM Subject: Re: [C++-sig] Accessing 2D array from python in C++ On Aug 14, 2012 4:25 AM, "sh

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-15 Thread alfa
From: Jim Bosch To: Development of Python/C++ integration ; shahmi Sent: Tuesday, August 14, 2012 5:54 PM Subject: Re: [C++-sig] Accessing 2D array from python in C++ On Aug 14, 2012 4:25 AM, "shahmi" wrote: > > Hi, > > I have tried to access

Re: [C++-sig] Accessing 2D array from python in C++

2012-08-14 Thread Jim Bosch
On Aug 14, 2012 4:25 AM, "shahmi" wrote: > > Hi, > > I have tried to access/expose 2D array from python in C++ using boost::multi_array. Nevertheless, it seems that the boost::multi_array datatype is not supported. Is there any way to resolve this? My way of accessing it as below: > >