[Numpy-discussion] Reference count error detected bug appears with multithreading (OpenMP TBB)

2012-01-18 Thread Malcolm Reynolds
Hi, I've built a system which allocates numpy arrays and processes them in C++ code (this is because I'm building a native code module using boost.python and it makes sense to use numpy data storage to then deal with outputs in python, without having to do any copying). Everything seems fine

Re: [Numpy-discussion] Reference count error detected bug appears with multithreading (OpenMP TBB)

2012-01-18 Thread Malcolm Reynolds
I suspect that you are obtaining the numpy object (1 Py_INCREF) before you split into multiple threads but releasing them in each thread (multiple Py_DECREFs). This is probably being hidden from you by the boost.python interface and/or the boost::detail::sp_counted_impl_p smart(ish) pointer.

Re: [Numpy-discussion] Addressing arrays

2012-01-30 Thread Malcolm Reynolds
On Mon, Jan 30, 2012 at 3:25 PM, Ted To rainexpec...@theo.to wrote: Is there some straightforward way to access an array by values across a subset of its dimensions?  For example, if I have a three dimensional array a=(x,y,z), can I look at the values of z given particular values for x and y?

Re: [Numpy-discussion] Unexpected reorganization of internal data

2012-01-31 Thread Malcolm Reynolds
Not exactly an answer to your question, but I can highly recommend using Boost.python, PyUblas and Ublas for your C++ vectors and matrices. It gives you a really good interface on the C++ side to numpy arrays and matrices, which can be passed in both directions over the language threshold with no

Re: [Numpy-discussion] hstack

2012-02-08 Thread Malcolm Reynolds
You On Wed, Feb 8, 2012 at 4:32 PM, Stephanie Cooke cooke.stepha...@gmail.com wrote: Hello, When I try to use the command hstack, I am given the error message TypeError: hstack() takes exactly 1 argument (2 given). I have a 9X1 array (called array) that I would like to concatenate to a 9X2