[Numpy-discussion] numpy.i: passing in in-place ND array as "flat" 1D array

2015-03-23 Thread Tom Krauss
I have a method on a C++ object that treats all elements the same and modifies the array in-place (quantizes each value). Usually I just have a vector, i.e. a 1D array. But today I wanted to quantize a 2D array, and the (DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1) failed to do the trick, because of

Re: [Numpy-discussion] numpy.i and std::complex

2014-10-28 Thread Sturla Molden
Robert Kern wrote: > The polite, welcoming > response to someone coming along with a straightforward, > obviously-correct contribution to our SWIG capabilities is "Thank > you!", not "perhaps you overestimate the number of NumPy users who use > Swig". That was a response to something else. As to

Re: [Numpy-discussion] numpy.i and std::complex

2014-10-28 Thread Robert Kern
On Mon, Oct 27, 2014 at 11:36 PM, Sturla Molden wrote: > Robert Kern wrote: > >> Please stop haranguing the new guy for not knowing things that you >> know. > > I am not doing any of that. You are the only one haranguing here. I understand that it's not your *intention*, so please take this as a

Re: [Numpy-discussion] numpy.i and std::complex

2014-10-27 Thread Sturla Molden
Robert Kern wrote: > Please stop haranguing the new guy for not knowing things that you > know. I am not doing any of that. You are the only one haranguing here. I usually ignore your frequent inpolite comments, but I will do an exception this time and ask you to shut up. Sturla _

Re: [Numpy-discussion] numpy.i and std::complex

2014-10-27 Thread Robert Kern
On Mon, Oct 27, 2014 at 4:27 PM, Sturla Molden wrote: > Glen Mabey wrote: > >> I chose swig after reviewing the options listed here, and I didn't see >> cython on the list: >> >> http://docs.scipy.org/doc/numpy/user/c-info.python-as-glue.html > > It's because that list is old and has not been up

Re: [Numpy-discussion] numpy.i and std::complex

2014-10-27 Thread MinRK
> > It's because that list is old and has not been updated. It has the > predecessor to Cython, Pyrex, but they are very different now. > > Both SciPy and NumPy has Cython as a build dependency, and also projects > like scikit-learn, scikit-image, statsmodels. > > If you find C++ projects which use

Re: [Numpy-discussion] numpy.i and std::complex

2014-10-27 Thread Sturla Molden
Glen Mabey wrote: > I chose swig after reviewing the options listed here, and I didn't see cython > on the list: > > http://docs.scipy.org/doc/numpy/user/c-info.python-as-glue.html It's because that list is old and has not been updated. It has the predecessor to Cython, Pyrex, but they are ver

Re: [Numpy-discussion] numpy.i and std::complex

2014-10-27 Thread Glen Mabey
On Oct 27, 2014, at 10:45 AM, Sturla Molden wrote: > Glen Mabey wrote: > >> I'd really like for this to be included alongside numpy.i -- but maybe I >> overestimate the number of numpy users who use complex data (let your >> voice be heard!) and who also end up using std::complex in C++ land.

Re: [Numpy-discussion] numpy.i and std::complex

2014-10-27 Thread Sturla Molden
Glen Mabey wrote: > I'd really like for this to be included alongside numpy.i -- but maybe I > overestimate the number of numpy users who use complex data (let your > voice be heard!) and who also end up using std::complex in C++ land. I don't think you do. But perhaps you overestimate the numb

[Numpy-discussion] numpy.i and INPLACE_ARRAY1[ANY]

2013-11-22 Thread Kaspar Emanuel
Hey, I am trying to improve the Lilv Python bindings to include numpy.i to allow for creation and verification of audio test buffers using NumPy. I am just trying to get *something* working at the moment so I am tring to wrap a test function. static inline vo

Re: [Numpy-discussion] numpy.i

2010-01-26 Thread Bill Spotz
Can you post a simple example of this not working? On Jan 26, 2010, at 1:42 AM, Ross Harder wrote: > I'm struggling with using some of the macros in numpy.i for my own > typemap. > The problem is that the arrayobject.h include does not end up in the c > wrapper code after swig runs. > numpy.i h

[Numpy-discussion] numpy.i

2010-01-25 Thread Ross Harder
I'm struggling with using some of the macros in numpy.i for my own typemap. The problem is that the arrayobject.h include does not end up in the c wrapper code after swig runs. numpy.i has at the beginning: %{ #ifndef SWIG_FILE_WITH_INIT # define NO_IMPORT_ARRAY #endif #include "stdio.h" #include