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

2012-02-02 Thread Mads Ipsen
On 31/01/2012 18:23, Chris Barker wrote: On Tue, Jan 31, 2012 at 6:14 AM, Malcolm Reynolds malcolm.reyno...@gmail.com wrote: 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

[Numpy-discussion] Unexpected reorganization of internal data

2012-01-31 Thread Mads Ipsen
Hi, I am confused. Here's the reason: The following structure is a representation of N points in 3D space: U = numpy.array([[x1,y1,z1], [x1,y1,z1],...,[xn,yn,zn]]) So the array U has shape (N,3). This order makes sense to me since U[i] will give you the i'th point in the set. Now, I want to

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] Unexpected reorganization of internal data

2012-01-31 Thread Matthew Brett
Hi, On Tue, Jan 31, 2012 at 8:29 AM, Mads Ipsen madsip...@gmail.com wrote: Hi, I am confused. Here's the reason: The following structure is a representation of N points in 3D space: U = numpy.array([[x1,y1,z1], [x1,y1,z1],...,[xn,yn,zn]]) So the array U has shape (N,3). This order makes

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

2012-01-31 Thread Chris Barker
On Tue, Jan 31, 2012 at 6:14 AM, Malcolm Reynolds malcolm.reyno...@gmail.com wrote: 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