Re: [Numpy-discussion] Getting data from NDarrays to Blitz++ and back again

2010-04-06 Thread Fernando Perez
On Sat, Apr 3, 2010 at 2:28 PM, Philip Sterne wrote: > I hope this is the correct place to post my question.  I'd like python to > interface with c++ code that makes heavy use of Blitz++ arrays. After a > day's hacking I appear to have a simple working solution which I am > attaching.  (It uses Bo

Re: [Numpy-discussion] Getting data from NDarrays to Blitz++ and back again

2010-04-06 Thread Philip Sterne
If anyone was interested I found that the easiest solution involved patching up the strides after calling PyArray_SimpleNewFromData(). I still haven't gotten any sort of memory interaction so any objects created by Blitz are deleted by Blitz, while Python objects are deleted by Python. (Irres

[Numpy-discussion] Getting data from NDarrays to Blitz++ and back again

2010-04-03 Thread Philip Sterne
Hi all, I hope this is the correct place to post my question. I'd like python to interface with c++ code that makes heavy use of Blitz++ arrays. After a day's hacking I appear to have a simple working solution which I am attaching. (It uses Boost.Python and CMake.) However I believe this so