Christopher Barker wrote:
>
> I know this has been discussed, but why doesn't numpy put its includes
> somewhere that distutils would know where to find it?
>
I think one answer is because distutils doesn't have defaults that play
well with eggs. NumPy provides very nice extensions to distut
Robert Kern wrote:
> Christopher Barker wrote:
>> how do I tell distutils
>> where to look for it?
> numpy.get_include()
Ah, got it. thanks.
I know this has been discussed, but why doesn't numpy put its includes
somewhere that distutils would know where to find it?
-Chris
--
Christopher B
Christopher Barker wrote:
> Hi all,
>
> I'm porting an extension from Numeric. At the top, I've changed:
>
> #include
>
> to
>
> #include
>
> But distutils can't find numpy/arrayobject.h -- how do I tell distutils
> where to look for it? I've gotten it to work by hard-coding the entire
> p
Hi all,
I'm porting an extension from Numeric. At the top, I've changed:
#include
to
#include
But distutils can't find numpy/arrayobject.h -- how do I tell distutils
where to look for it? I've gotten it to work by hard-coding the entire
path, but that's not very portable.
It looks like Nu
yeah! Looks good!
Thanks a lot.
Xavier
> Thanks!
>
> DG
>
> Lisandro Dalcin wrote:
>
>> David, I'll try to show you what I do for a custom C++ class, of
>> course this does not solve the issue resizing (my class does not
>> actually support resizing, so this is fine for me):
>>
>> My custom cla
Christopher Barker wrote:
> Xavier Gnata wrote:
>
>> Here it is :)
>>
>
> Thanks, that's helpful. Am I reading it right? Are you running the
> python process embedded in your C++ app? (rather than extending?)
>
>
Yes! The point is this way I'm able to debug my C++ code plotting the
ar
>
> OK, so you've now got a view of the data from the valarray. Nice to know
> this works, but, of course, fragile if the valarray is re-sized or
> anything, so it probably won't work for us.
>
Unless you use a special allocator/desallocator (I don't know if the latter
is possible), I don't know h
Xavier Gnata wrote:
> Here it is :)
Thanks, that's helpful. Am I reading it right? Are you running the
python process embedded in your C++ app? (rather than extending?)
> valarray < double >Data (NbData);
> array = PyArray_SimpleNewFromData (NbDims, Dims, PyArray_DOUBLE,
> &Data[0]);
OK,
Thanks for you input Xavier.
Xavier Gnata wrote:
> std:valarray are quite strange containers because they are not well
> integrated in the STL.
> I always use vector when I have to deal with arrays.
> ps : There are no real performance differences between vector and
> valarray (in my use cases